game.workspace.players.playersAlive.Changed:connect(function(newgame) local playersIngame = game.workspace.players.playersIngame.Value local playersAlive = game.workspace.players.playersAlive.Value local children = game.Players:GetChildren() print ('A player has died') if playersAlive <= 1 and playersIngame >= 2 then print ('A new round is to be started') wait (3) print ('Getting players') for i = 1, #children do print(i, children[i].Name) children.TeamColor = BrickColor.new("Really Black") end
Everything above is working the last line is working perfectly- Thank you for your help!
I ended up figuring out the issue.
Here is the fix if anyone is interested!
game.workspace.players.playersAlive.Changed:connect(function(newgame) local playersIngame = game.workspace.players.playersIngame.Value local playersAlive = game.workspace.players.playersAlive.Value local children = game.Players:GetChildren() print ('A player has died') if playersAlive <= 1 and playersIngame >= 2 then print ('A new round is to be started') wait (3) print ('Getting Players') for index, child in pairs(game.Players:GetChildren()) do child.TeamColor = BrickColor.new("Really black") end end