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

How do I make a click teleporter?

Asked by 4 years ago

Basically I want to make an elevator that has buttons and when you click them you get teleported up a floor or down a floor.

1 answer

Log in to vote
0
Answered by
Asceylos 562 Moderation Voter
4 years ago
Edited 4 years ago

Use the Model:MoveTo(Vector3) function for that. It teleports the specified model (in this case the player's character) to the specified Vector3.

Connect to the ClickDetector's MouseClick event to detect the click.

Update:

Insert a ClickDetector into the part that is clicked. Insert the following Script into the ClickDetector:

script.Parent.MouseClick:Connect(function(plr)
    plr.Character:MoveTo(Vector3.new(X, Y, Z))
end)

For X, Y and Z add the coordinates the player should be teleported to.

1
Can you ecxplain what to do further? I am an idiot H_armful 19 — 4y
0
ty! H_armful 19 — 4y
Ad

Answer this question