How do you make it so if you click, it teleports two players in 2 seperate positions?
COMMUNITY QUESTION
How do I teleport a player when they click on a GUI?
2 answers
I'm adding to the above answer, you can achieve the same by CFraming the Torso as-well as using MoveTo. Example:
game.Workspace.Owenrules12.Torso.CFrame = game.Workspace.Part.CFrame
OR
game.Workspace.Owenrules12.Torso.CFrame = CFrame.new(5,5,5) -- X,Y,Z
You can use the MouseButton1Click event on a TextButton.
YourTextButton.MouseButton1Click:connect(function()
-- Teleport the player
end)
Then you can teleport the player(s)!
YourPlayer1.Character:MoveTo(Position1)
YourPlayer2.Character:MoveTo(Position2)
This discussion is preserved as it was. New answers, comments, and votes are closed.
