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

How would i make a TextButton onclick teleport somewone to a part?

Im making a game and if somewone touches the TextButton It will teleport them to a part how can i do this?

1 answer

✓ Accepted answer

MouseButton1Down, game.Players.LocalPlayer, MoveTo(), etc.

script.Parent.MouseButton1Down:connect(function()
	game.Players.LocalPlayer.Character:MoveTo(workspace.Part.Position) --change workspace.Part to whatever part you want them to teleport to
end)

2 comments

1

Are you sure it isnt MouseButton1Click?

0

MouseButton1Down is also applicable. Click is a 'Down' followed by an 'Up' on the same GUI element, regardless of time passed.

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