DeGames
|
  |
| Joined: 08 Sep 2012 |
| Total Posts: 1028 |
|
|
| 20 Jan 2017 09:34 PM |
Everything works except it won't go through the if statement on the second part. It is commented with --[HERE] The first part uses the same setup, but it works?
allteams = game.Teams:GetChildren()
teamnames.OnServerEvent:connect(function(player,team,blue) print("www") if blue then print("d") local foundteam = nil for i,v in pairs(allteams)do if v.TeamColor == BrickColor.new("Steel blue") then print("wwerer") foundteam = v print(foundteam) end foundteam.Name = team end elseif blue == false then local foundteam = nil print("dggd") for i,v in pairs(allteams)do print("dddgfgd") if v.TeamColor == BrickColor.new("Earth green") then --[HERE]It doesn't get into here?? And the team color is 100% "Earth green" print(foundteam) foundteam = v end foundteam.Name = team end end end)
|
|
|
| Report Abuse |
|
|
DeGames
|
  |
| Joined: 08 Sep 2012 |
| Total Posts: 1028 |
|
|
| 20 Jan 2017 09:52 PM |
ahh i keep looking and looking it over, I just can't see a problem. anyone see whats wrong? maybe it'd be best if i look at it again some other time. idk
|
|
|
| Report Abuse |
|
|
|
| 20 Jan 2017 09:57 PM |
print V.TeamColor before you go into the second If statement.
|
|
|
| Report Abuse |
|
|
DeGames
|
  |
| Joined: 08 Sep 2012 |
| Total Posts: 1028 |
|
|
| 21 Jan 2017 03:48 PM |
ohh thanks i see the problem now, hm that's a good habit. I should print what im trying to find first lol
|
|
|
| Report Abuse |
|
|