local Fire = 0
local Ice = 0
local Math1 = math.rad(1,2)
game.Players.PlayerAdded:connect(function(Player)
if Fire - Ice >=2 then
Player.Neutral = false
Player.TeamColor.BrickColor = BrickColor.new("Bright blue")
Ice = Ice + 1
end
if Ice - Fire >= 2 then
Player.Neutral = false
Player.TeamColor.BrickColor = BrickColor.new("Bright red")
Fire = Fire + 1
end
if Ice - Fire == 0 then
if Math1 == 1 then
Player.Neutral = false
Player.TeamColor.BrickColor = BrickColor.new("Bright blue")
Ice = Ice + 1
else if Math1 == 2 then
Player.Neutral = false
Player.TeamColor.BrickColor = BrickColor.new("Bright red")
Fire = Fire + 1
end
end
end
end)
So what it does it keeps of how many players are on each team by the Fire, and Ice variables. And I think I got confused lines 7 and below is a bunch of math. And there are no errors in the output either. And it is supposed to be a team balance script, but I failed epicly. But the problem arises that it won't assign that Player to the team when the player joins. Ideas?
