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

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

Asked by 5 years ago

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

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 pidgey 548 — 5y
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 pidgey 548 — 5y

1 answer

Log in to vote
0
Answered by
TheePBHST 154
5 years ago

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)

Ad

Answer this question