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

Help With Teleporting script?

Asked by
Scootakip 299 Moderation Voter
8 years ago
player.Character.Torso.CFrame = Vector3.new(script.Parent.RunnerPiece.Position) + Vector3.new(0, i * 5, 0)

This script is supposed to teleport each player to a certain block's position, but it's not working. Can someone help me out with this?

3 answers

Log in to vote
1
Answered by
DeadToMe 105
8 years ago

You can use MoveTo on the Character.

player.Character:MoveTo(script.Parent.RunnerPiece.Position + Vector3.new(0, i * 5, 0))

Ad
Log in to vote
1
Answered by 8 years ago

Here is a function that might help you ;)


local function MovePlayerToPart(Player,Part) local Character = Player.Character or Player.CharacterAdded:wait() Character:MoveTo(Part) end
Log in to vote
0
Answered by 8 years ago

For a faster in my oppinion teleport try this.

player.Character.Torso.CFrame = CFrame.new(script.Parent.RunnerPiece.Position(0, i * 5, 0)
)

Answer this question