brayden99
|
  |
| Joined: 30 Sep 2007 |
| Total Posts: 1243 |
|
|
| 19 Oct 2012 07:55 PM |
Eveytime the "Winner Value" is changed to White it gets changed back because of
function GameOver() print("GameOver") Player = game.Players:GetChildren() wait(Delay) Russian.Value = DeathLimit German.Value = DeathLimit print("Changing to white") Winner.Value = BrickColor.new("White") --HERE VALUE IS CHANGED TO WHITE print("Now white") end end
function TeamDeathMatch() if German.Value <= 0 then GameOver() Winner.Value = BrickColor.new("Bright red") print("Bright red") elseif Russian.Value <= 0 then GameOver() Winner.Value = BrickColor.new("Black") print("Black") end end
function Check() TeamDeathMatch() end German.Changed:connect(Check) Russian.Changed:connect(Check) |
|
|
| Report Abuse |
|
|
brayden99
|
  |
| Joined: 30 Sep 2007 |
| Total Posts: 1243 |
|
|
| 19 Oct 2012 07:56 PM |
Because of this
function TeamDeathMatch() if German.Value <= 0 then GameOver() Winner.Value = BrickColor.new("Bright red") print("Bright red") elseif Russian.Value <= 0 then GameOver() Winner.Value = BrickColor.new("Black") print("Black") end end
|
|
|
| Report Abuse |
|
|
brayden99
|
  |
| Joined: 30 Sep 2007 |
| Total Posts: 1243 |
|
|
| 19 Oct 2012 07:58 PM |
But it shouldnt change the color of it because it cant unless Value <= 0 and the value is reset to 30 before it it can even play that function again... |
|
|
| Report Abuse |
|
|
rayoma
|
  |
| Joined: 13 Nov 2009 |
| Total Posts: 1911 |
|
|
| 19 Oct 2012 08:02 PM |
> GameOver() Winner.Value = BrickColor.new("Black")
This means that it will run the function GameOver() and then when that finishes, change the color. What you want is for it to be the OTHER way around, change the color then run GameOver(). So flip the order of those two lines. |
|
|
| Report Abuse |
|
|
brayden99
|
  |
| Joined: 30 Sep 2007 |
| Total Posts: 1243 |
|
|
| 19 Oct 2012 08:04 PM |
| HOLY CRAP DUDE!! THANK YOU!!!!!!!!! |
|
|
| Report Abuse |
|
|
rayoma
|
  |
| Joined: 13 Nov 2009 |
| Total Posts: 1911 |
|
| |
|