Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do I make a part(button) that teleports you when you click it?

Asked by 4 years ago

I've seen a bunch of tutorials for how to make it so you teleport to a certain position but how do you do it for a game?

So, I'm trying to make a part which is the button, teleport you when you click it. Anyone know how to do it?

0
Well for the click portion, you would use a click detector and put the teleport script under that. Are you trying to teleport them to a different game or just another spot in the current game? ProEndurance 0 — 4y
0
a differnet game MakrDaRussian 0 — 4y

1 answer

Log in to vote
0
Answered by 4 years ago
Edited 4 years ago

Insert this script inside a Part that obviously contains a "ClickDetector"

local Part = script.Parent
local CD = Part.ClickDetector
local GameId = --Put your game ID here

CD.MouseClick:connect(function(Player)
    game:GetService('TeleportService'):Teleport(GameId, Player)
end) 

;)

Ad

Answer this question