Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

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

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?

2 comments

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?

0

a differnet game

1 answer

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) 

;)

This discussion is preserved as it was. New answers, comments, and votes are closed.