game.Players.PlayerAdded:connect(function(player)
player.CharacterAdded:connect(function(character)
if player.Character then
while true do
wait(10)
for i, v in pairs(game.Players:GetChildren()) do
v.Character.Torso.CFrame = CFrame.new(381.99, 309.21, 240.86)
wait(10)
v.Character.Torso.CFrame = CFrame.new(148.958, 199.493, 4.484)
end
end
end
end)
end)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
How would I edit the above (working) to teleport each player to a different out of 3 or 4 different positions.
Let's say, I have 4 players in the game, I also have 8 different positions, but I want to teleport each player randomly to a random position out of all 8. |