|
| 28 Mar 2013 06:44 PM |
I have a script that detects team color and gives the player the appropriate armor based of of that team, however this line won't work:
if Player.TeamColor == ("Bright red") then
It dosn't break the script, it just completely skips it over as if it is true, whereas in my tests the player is not on red team. I still get the armor, so everything else works fine. Can someone help? |
|
|
| Report Abuse |
|
|
FIRECAKE
|
  |
| Joined: 28 Feb 2009 |
| Total Posts: 25167 |
|
|
| 28 Mar 2013 06:45 PM |
I believe it is case sensitive
"Bright Red"
⊂=-҉Ξ҉-=⊃ Verb conjugator, plus herb inhalator ⊂=-҉Ξ҉-=⊃ |
|
|
| Report Abuse |
|
|
zack785
|
  |
| Joined: 06 Feb 2009 |
| Total Posts: 419 |
|
|
| 28 Mar 2013 06:48 PM |
| ^ No, "Bright red" is correct, as a matter of fact it is case sensitive, and the colors first word is capitalized and the second is not. |
|
|
| Report Abuse |
|
|
zack785
|
  |
| Joined: 06 Feb 2009 |
| Total Posts: 419 |
|
|
| 28 Mar 2013 06:49 PM |
| Try if Player.TeamColor = BrickColor.new("Bright red") then, just test it. |
|
|
| Report Abuse |
|
|
dmjoe
|
  |
| Joined: 01 May 2009 |
| Total Posts: 2387 |
|
|
| 28 Mar 2013 06:50 PM |
To be sure, do this:
if Player.TeamColor == game.Teams:findFirstChild("YOURTEAMNAME").TeamColor then
~print("pew")~ |
|
|
| Report Abuse |
|
|
Desperian
|
  |
| Joined: 07 Feb 2012 |
| Total Posts: 3371 |
|
|
| 28 Mar 2013 06:52 PM |
if Player.TeamColor == BrickColor.new("Bright red") then
Zack, don't forget the dual equals for comparing the value.
|
|
|
| Report Abuse |
|
|
|
| 28 Mar 2013 06:53 PM |
BrikColor.new did it, thanks :D
Though thats kind of weird... I thought that would specifically imply to a brick. |
|
|
| Report Abuse |
|
|