|
| 12 Mar 2015 09:34 PM |
So im making a GUI that displays the TOTAL amount of a teams kills, Im wondering if the code is correct..
while wait(0.33) do for index, child in pairs (game.Players:getChildren()) do if child.TeamColor==BrickColor.new("Bright green") then if child:FindFirstChild("leaderstats") then if child.leaderstats:FindFirstChild("kills") then local teamG = 0 teamG = teamG + child.leaderstats.kills.Value script.Parent.GreenTeam.TextBox.Text = ""..teamG.."" wait() teamG = teamG - child.leaderstats.kills.Value end end elseif child.TeamColor==BrickColor.new("Brick yellow") then if child:FindFirstChild("leaderstats") then if child.leaderstats:FindFirstChild("kills") then local teamD = 0 teamD = teamD + child.leaderstats.kills.Value script.Parent.DesertTeam.TextBox.Text = ""..teamD.."" wait() teamD = teamD - child.leaderstats.kills.Value end end end end end |
|
|
| Report Abuse |
|
|
| 12 Mar 2015 09:36 PM |
Thats a bit to complex for the thing you are trying to do.
[Haydebug2003] [LMaDer] |
|
|
| Report Abuse |
|
|
| 12 Mar 2015 09:37 PM |
| Well, do you know how to sum it up? |
|
|
| Report Abuse |
|