I have a script that gets 4 teams from Lighting, clones them, puts them in the Teams service, and then (is supposed to) assigns players to it. The problem is, it won't assign players to the teams. This is the script for cloning the teams/map, and moving them to the right place:
map = game.Lighting.Crossroads:Clone()
red = game.Lighting.Red:Clone()
blue = game.Lighting.Blue:Clone()
green = game.Lighting.Green:Clone()
yellow = game.Lighting.Yellow:Clone()
map.Parent = game.Workspace
red.Parent = game.Teams
blue.Parent = game.Teams
green.Parent = game.Teams
yellow.Parent = game.Teams
That all works fine and dandy, but when I try to assign players to the teams, with:
player = game.Players:GetChildren()
for p = #player, #player do
if(player[p].TeamColor==BrickColor.new("White"))and (player[p].Character~=nil)then
player[p].TeamColor = blue.TeamColor
end
end
for p = #player/2, #player do
if(player[p].TeamColor==blue.TeamColor)and (player[p].Character~=nil)then
player[p].TeamColor = red.TeamColor
end
end
for p = #player/2, #player do
if(player[p].TeamColor==red.TeamColor)and (player[p].Character~=nil)then
player[p].TeamColor = green.TeamColor
end
end
for p = #player/2, #player do
if(player[p].TeamColor==blue.TeamColor)and (player[p].Character~=nil)then
player[p].TeamColor = yellow.TeamColor
end
end
It doesn't work. I looked in output, and nothing shows up. Please help :)

3 comments
this is a fm script, but you want to divide the #players by 4 not 2...
I am dividing by 2 because I want to keep people on blue: move all 2 blue, take half of blue to red, take half of red to green, and half of blue to yellow. That would put it into quarters.
I need help :(