Recently, I was trying to loop through the players to teleport them, but somehow, the loop doesn't work.
I made sure that the function called by printing "Called"
local players = game.Players:GetPlayers() local function teleportToMap(Spwans) print("Called") for i,plr in pairs(players) do if plr.Character then if plr.Character:FindFirstChild("HumanoidRootPart") then plr.Character.HumanoidRootPart.CFrame = Spwans[math.random(1,#Spwans)].CFrame end end end end teleportToMap(workspace.Map:WaitForChild("Spawns"):GetChildren())