1 | local plrs = game.Players:GetPlayers() |
2 |
3 | plrs.TeamColor = BrickColor.new( "Medium red" ) |
The plrs
variable points to a table. All you are doing is adding a TeamColor
field into the table.
What you want to do is traverse the table, so you can get a reference to a player one at a time, via a generic for loop.
1 | for _, player in ipairs (players) do -- pls change plrs to players in your script it's more readable |
2 | player.TeamColor = BrickColor.new( "Medium red" ) |
3 | end |