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 GUI button teleport you to another place?

Dear reader, Hello robotfan200 speaking! I am just learning how to script. But I have a map and the main menu has a button that will be used to teleport someone to another world, place, map, whatever you want to call it. But I cant figure out how to make it that way... Please Help! From the owner of: RoFa Development (A future ROBLOX game development group)

3 answers

Here is how you would do it from a localscript. Place a localscript inside the TextButton.

local self = script.Parent;
local Player = game.Players.LocalPlayer;
local Character = Player.Character or Player.CharacterAdded:wait();

self.MouseButton1Down:connect(function()
	Character:MoveTo(Vector3.new(0,0,0));-- Change 0,0,0 to your position.
end)

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