EpicMeep
|
  |
| Joined: 18 Jan 2011 |
| Total Posts: 830 |
|
|
| 19 Nov 2011 10:17 PM |
Output: Workspace.Script:9: attempt to perform arithmetic on field 'Kills' (a userdata value)
Script: while true do wait(1) g = game.Players:GetChildren() for i = 1, #g do if g[i].TeamColor == game.Teams.Robloxians.TeamColor then game.Teams.Robloxians.Score = game.Teams.Robloxians.Score + g[i].leaderstats.Kills elseif g[i].TeamColor == game.Teams.Mutants.TeamColor then game.Teams.Mutants.Score = game.Teams.Mutants.Score + g[i].leaderstats.Kills end end end
What I am trying to do is make a teams score the number of KOs it`s players has combined. I do not understand this output... |
|
|
| Report Abuse |
|
|
|
| 19 Nov 2011 10:31 PM |
You have to put .Value at the end of your integer and number value references. It can't change an object to a number.
Sincerely, Noobertuber |
|
|
| Report Abuse |
|
|
EpicMeep
|
  |
| Joined: 18 Jan 2011 |
| Total Posts: 830 |
|
|
| 20 Nov 2011 08:59 AM |
| Oh! That makes since because in leaderstats the Kills and Deaths are a Value. Thanks. |
|
|
| Report Abuse |
|
|