01 | team_income = { } |
02 |
03 | team_income [ "Camo" ] = 20 |
04 | team_income [ "White" ] = 1000 |
05 | INCOME_TIMER = 1 |
06 |
07 | while ( true ) do |
08 | for index, player in pairs (game.Players:GetPlayers()) do |
09 |
10 | print (player.Name) |
11 | if player.Neutral = = false then |
12 | player.cash.Value = player.cash.Value + team_income [ player.TeamColor.Name ] -- replace player.cash.value with whatever holds the players money |
13 | end |
14 | end |
15 | wait(INCOME_TIMER) |
16 | end |
I keep getting a "cash is not a valid member of player" error. How do I fix it?
Unless you have a variable that states "Cash" is a value of the Leaderboard, it won't work.