How can I make a gui that teleports you to the map. For example your in a lobby and the map changes and teleports you automatically to the lobby, and then you enter the map by clicking that gui?
✓ ANSWER ACCEPTED
How can I make a gui that teleports you to the map?
2 answers
✓ Accepted answer
If you want a button to teleport you to the map, something like this.
local plr = game.Players.LocalPlayer
local button = script.Parent
button.MouseButton1Click:connect(function()
plr.Character.Torso.CFrame = game.Workspace["GUIPart"].CFrame -- name of the block you want to teleport to.
end)
on a textbutton, insert a localscript with the following code:
position = Vector3.new(0,0,0) -- CHANGE THIS TO THE POSITION
script.Parent.Button1Click:connect(function()
game.Players.LocalPlayer.Character.Torso.CFrame = CFrame.new(position)
end)
3 comments
0
Ok, sorry if this sounds dum, but where can I get the position? Do I have to try until its in the spot I want?
1
The position will be in a part under "Properties"
0
Thanks!
This discussion is preserved as it was. New answers, comments, and votes are closed.

3 comments
Thanks! It works!
Dummiez, Hey man you helped me in scriptinghelpers in what my problem was how to make a gui teleport you in to the game. Therefore, I just had a question in which what it is, how do I make the gui with the script spawn in 3 places randomly choosing them. Thank you! I hope you look forward in helping me out. Sincerely, AlanLogic
Thanks