Hi, I have a script that teleports everybody to an area but after all players are teleported it keeps teleporting all the players to the area here is the script:
while wait(0.01) do
for i,v in pairs(game.Players:GetPlayers()) do
task.wait(0.01)
v.Character:WaitForChild("HumanoidRootPart").CFrame = CFrame.new(710, 35, -102)
end
print("Teleported All Players!")
end
You don’t have to loop it, but instead have it just be running on it’s own:
for i,v in pairs(game.Players:GetPlayers()) do
task.wait(0.01)
v.Character:WaitForChild("HumanoidRootPart").CFrame = CFrame.new(710, 35, -102)
end
print("Teleported All Players!")