Hi, i am creating a game about zombies and i made a map script and it doesn't teleport all the players, am i doing something wrong?
-- Game Script local maps = game.ReplicatedStorage.Maps:GetChildren() local gun = game.ReplicatedStorage.TrenchGun local players = game.Players:GetPlayers() local intertime = 10 local roundtime = 10 local status = game.ReplicatedStorage.Status local spawns = game.Workspace.Spawns:GetChildren() while wait() do for i=intertime,1,-1 do status.Value = "Intermission: "..i.." seconds remaining." wait(1) end local chosenmap = maps[math.random(1,#maps)] local cchosenmap = chosenmap:Clone() cchosenmap.Parent = game.Workspace.MapStorage status.Value = "Chosen map: "..cchosenmap.Name wait(3) local spawnpoints = cchosenmap.MapSpawns:GetChildren() for i,v in pairs(players) do -- this doesn't work (doesn't teleport players) if v.Character then v.Character.Torso.CFrame = spawnpoints[math.random(1,#spawnpoints)].CFrame end end for i=roundtime,1,-1 do status.Value = "Round: "..i.." seconds remaining." wait(1) end for i,v in pairs(players) do -- this doesn't work (doesn't kill the players) if v.Character then v.Character.Humanoid.Health = 0 end end end --[[ For reference, the spawnpoints are inside a folder, not a group. --]]