btft
|
  |
| Joined: 19 Feb 2011 |
| Total Posts: 1512 |
|
|
| 25 May 2013 11:55 PM |
This is supposed to keep changing the TextLabel's text to how much people are on a team, yet it changes it to 1 (if there is 1 on a team) but it dosen't change it back to 0 when the player changes teams. ;/
tab = {} while wait() do for _, a in pairs(game:service'Players':GetPlayers()) do if a.TeamColor == BrickColor.new("Bright blue") then table.insert(tab, a.Name) script.Parent.Text = "TEAM NUM: "..#tab tab = {} --change #tab to 0 so it recycles. end end end
Thanks! |
|
|
| Report Abuse |
|
|
btft
|
  |
| Joined: 19 Feb 2011 |
| Total Posts: 1512 |
|
|
| 25 May 2013 11:56 PM |
| forgot to add, if I reset everything is fine. |
|
|
| Report Abuse |
|
|
btft
|
  |
| Joined: 19 Feb 2011 |
| Total Posts: 1512 |
|
|
| 25 May 2013 11:57 PM |
| Meaning that it changes to 0, the script still doesn't work. |
|
|
| Report Abuse |
|
|
|
| 25 May 2013 11:59 PM |
if a.TeamColor == BrickColor.new("Bright blue") then
Ew, no.
Your checking it, not changing the color!
if a.TeamColor == "colornamegoeshere" then
expect me |
|
|
| Report Abuse |
|
|
|
| 26 May 2013 12:00 AM |
1. I dont want to change the color. 2. TeamColor returns a BrickColor Value. |
|
|
| Report Abuse |
|
|
|
| 26 May 2013 12:01 AM |
He doesn't* I am so used to saying stuff for me! xD Sorry for my typo |
|
|
| Report Abuse |
|
|
btft
|
  |
| Joined: 19 Feb 2011 |
| Total Posts: 1512 |
|
| |
|
|
| 26 May 2013 12:02 AM |
LikeAboss your a stupid idiot you need to learn how to script before you give off useless information.
You are comparing teams right, you need BrickColor.new() |
|
|
| Report Abuse |
|
|
btft
|
  |
| Joined: 19 Feb 2011 |
| Total Posts: 1512 |
|
|
| 26 May 2013 12:03 AM |
| So, what am I doing wrong? |
|
|
| Report Abuse |
|
|
|
| 26 May 2013 12:13 AM |
while wait() do tab = {} for _, a in pairs(game:service'Players':GetPlayers()) do if a.TeamColor == BrickColor.new("Bright blue") then table.insert(tab, a.Name) script.Parent.Text = "TEAM NUM: "..#tab tab = {} --change #tab to 0 so it recycles. end end end |
|
|
| Report Abuse |
|
|
btft
|
  |
| Joined: 19 Feb 2011 |
| Total Posts: 1512 |
|
|
| 26 May 2013 12:31 AM |
| Yeah I figured it out when I actually looked back here. But, thanks for the help! |
|
|
| Report Abuse |
|
|