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
We use cookies to offer you a better experience. By using Roblox.com, you are agreeing to our Privacy and Cookie Policy.
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

Changing values on loop.

Previous Thread :: Next Thread 
NeoEclipse is not online. NeoEclipse
Joined: 09 Apr 2012
Total Posts: 5407
03 Apr 2013 07:05 PM
I want a Gui to gradually grow from black to light grey in color.

Is there a way I can write a script to loop the Gui getting lighter until the designated color?

I just cant get it.. Im sure its simple.. But I just cant get it..
Report Abuse
NeoEclipse is not online. NeoEclipse
Joined: 09 Apr 2012
Total Posts: 5407
03 Apr 2013 07:19 PM
Bump.
Report Abuse
unholysoda is not online. unholysoda
Joined: 15 May 2010
Total Posts: 9024
03 Apr 2013 07:25 PM
Post what you have, and I will fix it.
Report Abuse
NeoEclipse is not online. NeoEclipse
Joined: 09 Apr 2012
Total Posts: 5407
03 Apr 2013 07:50 PM
I dont know.. This is my attempt.

for i = 1, until GUI.BackGroundColor3 = (255/255,255/255,255/255) do --until its white
GUI.BackgroundColor3 = GUI.BackgroundColor3 * Color3.new(1,1,1) --Make lighter
wait(.1) --Time until color changes again
end
Report Abuse
NeoEclipse is not online. NeoEclipse
Joined: 09 Apr 2012
Total Posts: 5407
03 Apr 2013 08:34 PM
bump
Report Abuse
veerstrong is not online. veerstrong
Joined: 23 Jun 2009
Total Posts: 2450
03 Apr 2013 08:46 PM
repeat until
and math.random are friends.

~One must risk everything to find the truth. Even if the truth isn't what you want it to be, it is better than living a lie.~
Report Abuse
NeoEclipse is not online. NeoEclipse
Joined: 09 Apr 2012
Total Posts: 5407
03 Apr 2013 08:48 PM
Could you evaluate more on that?
Report Abuse
nate890 is not online. nate890
Joined: 22 Nov 2008
Total Posts: 21686
03 Apr 2013 08:54 PM
for i = 255, 0, -1 do
gui.BackgroundColor3 = Color3.new(i, i, i)
wait()
end
Report Abuse
NeoEclipse is not online. NeoEclipse
Joined: 09 Apr 2012
Total Posts: 5407
03 Apr 2013 09:01 PM
Thanks!

Could you explain that? So I can better understand it?
Report Abuse
MrChubbs is not online. MrChubbs
Joined: 14 Oct 2010
Total Posts: 4969
03 Apr 2013 09:02 PM
It is a for loop, i equals 255 to 1 with a step of -1 so I startes at 255 and changes by -1 each time it goes through the loop.
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