while true do
wait(5)--intermission
maps = game.ServerStorage.Maps:GetChildren()
map = maps[math.random(1, #maps)]
map:Clone().Parent = game.Workspace
blue = 0
red = 0
local teamplay = game.Players:GetChildren()
for i = 1,game.Players.NumPlayers do
local ran = math.random(1,game.Players.NumPlayers)
if blue == red then -- if they are the same it is randomely generated
br = math.random(1,2)
if br == 1 then
teamplay[ran].TeamColor = BrickColor.new("Bright blue")
elseif br == 2 then
teamplay[ran].TeamColor = BrickColor.new("Bright red")
end
elseif red >= blue then
teamplay[ran].TeamColor = BrickColor.new("Bright red")
elseif blue >= red then
teamplay[ran].TeamColor = BrickColor.new("Bright blue")
end
end
for _,player in pairs(game.Players:GetPlayers()) do
if player.Character then
spawns = map.Spawns:GetChildren()
player.Character:MoveTo(spawns[math.random(1, #spawns)].Position)
end
end
wait(300)-- five minutes
for i,player in pairs(game.Players:GetPlayers()) do
if player.Character then
player.Character.Head:remove()
player.TeamColor = BrickColor.new("White")
end
end
end
I am wondering how to fix this. It seems like it doesn't work even though I've added spawns.

6 comments
I defined what my map is, but I still can not spawn to the bricks.
When does this script run? Does it run during a round or something?
I can post up the whole script.
Where exactly does it stop working?
It doesn't work when the character is suppose to move into position where the brick is.
I solved the spawning problem. The only thing is the team chooser.