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

MoveTo Event Help?

Asked by
FiredDusk 1466 Moderation Voter
8 years ago

I keep looking over this SIMPLE SIMPLE CODE but I see no errors or any problems!

Tp = game.Workspace:WaitForChild("Tp")
APlayers = game.Players:GetChildren()
wait(10)
for i,v in pairs (APlayers) do
    v:MoveTo(Vector3.new(-88.027, 47.591, 109.527))
end

1 answer

Log in to vote
2
Answered by 8 years ago

When calling the i,v loop, v equals the Player in game.Players. To move the actual character, you are going to want v.Character, so change line 5 to this:

v.Character:MoveTo(Vector3.new(-88.027, 47.591, 109.527))
Ad

Answer this question