Why isn't this script working?!
Ok so I have tried to change the script so it would work and I have tried putting it into teams.
Here is the script:
05 | game.Players.PlayerAdded:connect( function (player) |
07 | local leaderstats = Instance.new( "Model" , player) |
09 | leaderstats.Name = "leaderstats" |
11 | game.Players.PlayerAdded:connect( function (player) |
13 | local leaderstats = Instance.new( "Model" , player) |
15 | leaderstats.Name = "leaderstats" |
19 | local money = Instance.new( "IntValue" , leaderstats) |
27 | local money = Instance.new( "IntValue" , leaderstats) |
35 | stats [ player ] = leaderstats |
43 | for player, stats in ipairs (playerStats) do |
45 | players.Money.Value = stats.Money.Value + 1 |
53 | function CheckTeams(player) |
55 | if player.TeamColor = = BrickColor.new( "Bright red" ) then |
57 | player.leaderstats.Money.Value = player.leaderstats.Money.Value + 1 |
Please help, I don't know what's wrong (yes I do have a team that is brick colour ''Bright red'' so it's not because it's for the wrong team.)