Roblox How to | Button that Teleports You to Other Games (2022)

preview_player
Показать описание
In this Roblox Studio Tutorial, I teach you guys step by step how to make a button that teleports you to other games when you click it!
Music used at the bottom of the description!

Script (To copy) I suggest watching the full video to understand how it works!

local teleport = game.ReplicatedStorage:WaitForChild("Teleportplayer") --Assigns a variable to the Remote Event in the Replicated Storage

script.Parent.MouseButton1Click:Connect(function() --Runs code when the button is clicked
teleport:FireServer() --Fire the Remote Event to the server
end) --End function

Script (Under the ServerScriptService)

local teleport = game.ReplicatedStorage:WaitForChild("Teleportplayer") ----Assigns a variable to the Remote Event in the Replicated Storage
local teleportservice = game:GetService("TeleportService") --Gets the teleport service in Roblox
local placeId = 6651677874 --Game Id, replace 6651677874 with your game Id
local players = game:GetService("Players") --Gets the players in the game
local player = players:GetPlayers()[1] --Gets the first player

teleport.OnServerEvent:Connect(function(player) --Code runs when the Remote Event is fired
teleportservice:TeleportAsync(placeId,{player}) --Teleports player to other game
end) --End function

Make sure to like and subscribe if you enjoyed it or if this video helped :)

Music Used:
Elektronomia - Sky High [NCS Release]
Tobu - Candyland

Tags: #roblox #robloxstudio #onfirerobloxscripting #tutorial
Рекомендации по теме
Комментарии
Автор

Hope this helps you out! Script is in the description if you want to copy it, but it won't work if you don't add in the stuff shown in the video!

onfirerobloxscripting
Автор

Bro you're the best. First Dev that actually puts the script in the description <333

matiasgriefgerman
Автор

BRO, THANK YOU SO I TRIED TO DO THE TUTORIAL OF SEVERAL VIDEOS AND NONE OF THEM WERE USEFUL AND WHEN I GOT IN YOURS I WAS SURPRISED. THANK YOU REALLY VERY MUCH

lorenzo_fc
Автор

thanks bro! Helped a lot + 1 subscriber

morenicraft
Автор

Does it teleport all players? I just want one player to get teleported only.

FanFanFan
Автор

Thanks! I can now make a good story game for one player

fizistyleparodie
Автор

Hey thanks for a another tutorial but it didn't worked :( It says: "Error code 769." How do i fix it? pls help

xbakonaras
Автор

What if I want to make more button to teleport like 8 buttons?

nohandlemaybe
Автор

Fun fact, you can use this to create a map, where if you click on an area, it'll TP you!

chihyasw
Автор

it says "Attempted to teleport to restricted place 773 error code"

saintz
Автор

what do i do if i have multiple of theese going to multiple games

luhcuh-xt
Автор

Thank you so much but it took more than one second but it still works.

combinesoldier
Автор

I have a problem; I get the error in studio (which is normal) but then when I try to teleport in the actual game it does nothing, it doesn't even give me an error message. Anyone know how to fix this?

luz
Автор

Hi! i know i might be late but im making a roblox game that has a party system, and i need help for a button that teleports everyone in a folder (in replicatedstorage) to another game, could you help make a vid on it?

Manastary
Автор

hello, i watch video and makestep by step but its doesnt work can u help me pls?

mikkew
Автор

thanks dude needed it I didn't know how to do this

The_Bizzzzzz
Автор

i need help, i copied the scrip, i watched the video, and it still does not work, help?

SallyFace
Автор

It doesn’t work it keeps saying “teleport failed due to an unexpected error” can anyone help please?

JwstDent
Автор

The part that says "local players:GetPlayers()[1]" isn't working :/ roblox says it's an expected identifier and an incomplete statement.

zenhart
Автор

is there a way to make it so you can only join the game (the one that the button teleports you to) only be accessible through that button?

seadoglord