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

How do i teleport a local player to a certain position?

How do i teleport a local player to a certain position?

2 comments

0

Use the MoveTo function in the local player's character.  It requires a Vector3 value for its argument. https://developer.roblox.com/api-reference/function/Model/MoveTo

0

Another option would be to use function SetPrimaryPartCFrame in the local player's character, MoveTo moves the model upwards if anything's in the way - SetPrimaryPartCFrame doesn't. This one uses a CFrame value for its argument. https://developer.roblox.com/api-reference/function/Model/SetPrimaryPartCFrame

1 answer

✓ Accepted answer

Well, it'd help if you were specific.

But, I'll give you an explanation. You could use a local script and use game.Players.LocalPlayer and from there, get the character. Then, you'd do Player.Character.HumanoidRootPart.CFrame = workspace.Part.CFrame But for a specific XYZ Coord, you'd do CFrame.new(X, Y, Z)

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