My friend asked this to me. He wants to teleport ALL players in the server, to a spesific area on the server. The following code that he has only teleports ONE player.
The code:
while true do
wait(1)
local m = math.random(1,1)
local player = game.Players:GetPlayers()
for i = 1, #player do
msg = Instance.new("Message")
msg.Parent = nil
if m == 1 then
msg.Parent = game.Workspace -- gets players
wait(10)
player[i].Character:MoveTo(Vector3.new(297.023, 41.105, 41.83))
msg:remove()
wait(60)
end
wait(5)
player[i].Character:MoveTo(Vector3.new(-23.112, 101.5, 38.096))
msg:remove()
end
end

4 comments
"msg.Parent = game.Workspace -- gets players" just wanna point this out
do msg.Parent = game.Workspace to get the players
lol wtf how does line 9 get players beat you to it hiim
okay......?