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

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

Asked by
K_H0ck 4
6 years ago

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.

0
Try create a Invisible Block with a TextButton inside. Anubizx 76 — 6y

1 answer

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

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)

0
Idk why it condensed it for some reason. Here is the code in Script form: https://www.roblox.com/library/1244785709/Teleport-Script tawk1215 47 — 6y
0
are the (0, 0, 0) coordinates K_H0ck 4 — 6y
0
Yes tawk1215 47 — 6y
Ad

Answer this question