generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

Please help, Been trying to figure out ALL DAY!

Previous Thread :: Next Thread 
brayden99 is not online. 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 is not online. 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 is not online. 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 is not online. 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 is not online. brayden99
Joined: 30 Sep 2007
Total Posts: 1243
19 Oct 2012 08:04 PM
HOLY CRAP DUDE!! THANK YOU!!!!!!!!!
Report Abuse
rayoma is not online. rayoma
Joined: 13 Nov 2009
Total Posts: 1911
19 Oct 2012 08:08 PM
No problem
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image