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

How Do You Make A Text Button On A Surface GUI Teleport You To A given Location?

i want to make a text button on a surface GUI in a lobby teleport you to the location you have set in the game. i would also like it to change location every time someone teleport's to the location set, for instance, if i was making an assassin type game but you have to click a button to teleport into the map set.

1 comment

0

Try create a Invisible Block with a TextButton inside.

1 answer

✓ Accepted answer

Make a Local Script than put this code inside:

function onClicked() if script.Parent.Parent.Parent.Parent.Character:FindFirstChild("Board") ~= nil then script.Parent.Parent.Parent.Parent.Character.Board:remove() end script.Parent.Parent.Parent.Parent.Character.Torso.CFrame = CFrame.new(0, 0, 0) end script.Parent.MouseButton1Down:connect(onClicked)

Than change the numbers (0, 0, 0) to the brick you want the player to teleport to when they click the Text Button. (Put the script in the Text Button)

3 comments

0

Idk why it condensed it for some reason. Here is the code in Script form: https://www.roblox.com/library/1244785709/Teleport-Script

0

are the (0, 0, 0) coordinates

0

Yes

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