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

teleport all players script not working?

So I'm working on a survive the disasters game and I'm making a "teleport all players" so I can teleport them to a map and then back after the disaster is over but my script isn't working. could some one please fix it and explain what I did wrong?

for I = 1, #players do Players(I).Character.Torso:Moveto(502.352, 1.95, 51.291) end

1 answer

target = CFrame.new(0, 50, 0) --where they teleport position
for i, player in ipairs(game.Players:GetChildren()) do
   if player.Character and player.Character:FindFirstChild("Torso") then
      player.Character.Torso.CFrame = target + Vector3.new(0, i * 5, 0)
   end
end

your welcome

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