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
 

Re: Need help for transitions of Colors

Previous Thread :: Next Thread 
Uwilldie7884 is not online. Uwilldie7884
Joined: 20 Mar 2009
Total Posts: 341
04 Feb 2012 02:49 PM
I have been trying to make a GUI that slowly transitions from one color to another. The efforts I have made have gotten me some progress, but below will tell what I need help with.

What it's doing: It starts at a different color, but it does end up with the color I want. (The color it starts at is a subtraction of both destination color and starting color)

What I intended: I wanted the script to start with my selected starting color. That is the only problem I cannot fix.


Script:

local Start_R=159/255
local Start_G=130/255
local Start_B=130/255
----------------
local End_R=101/255
local End_G=72/255
local End_B=79/255
----------------
lig = game.Lighting
wait(1)
print("Started")
for i = 0, 1 , 1/255 do
!lig.Ambient = Color3.new((Start_R+End_R*i)-End_R,(Start_G+End_G*i)-End_G,(Start_B+End_B*i)-End_B)!
wait(1/255)
end
print("Done")

(! - This means that it is one line of code)


Any solutions?
Report Abuse
Uwilldie7884 is not online. Uwilldie7884
Joined: 20 Mar 2009
Total Posts: 341
04 Feb 2012 03:21 PM
Help anyone?
Report Abuse
Uwilldie7884 is not online. Uwilldie7884
Joined: 20 Mar 2009
Total Posts: 341
04 Feb 2012 04:03 PM
bump
Report Abuse
magnalite is not online. magnalite
Joined: 18 Oct 2009
Total Posts: 2467
04 Feb 2012 04:08 PM
not sure but try this...

local Start_R=159/255
local Start_G=130/255
local Start_B=130/255
----------------
local End_R=101/255
local End_G=72/255
local End_B=79/255
----------------
lig = game.Lighting
wait(1)
print("Started")
for i = 0, 100 do
!lig.Ambient = Color3.new((Start_R+((Start_R/End_R)*i)),(Start_G+((Start_G/End_G)*i)),(Start_G+((Start_G/End_G)*i))
wait(1/255)
end
print("Done")


Actually i have no idea if that will work, just try it!
Report Abuse
Uwilldie7884 is not online. Uwilldie7884
Joined: 20 Mar 2009
Total Posts: 341
04 Feb 2012 04:22 PM
I tried your script magnalite, but it made a disco. o.e
Report Abuse
magnalite is not online. magnalite
Joined: 18 Oct 2009
Total Posts: 2467
04 Feb 2012 04:28 PM
:/

local Start_R=159/255
local Start_G=130/255
local Start_B=130/255
----------------
local End_R=101/255
local End_G=72/255
local End_B=79/255
----------------
lig = game.Lighting
wait(1)
print("Started")
for i = 0, 100 do
!lig.Ambient = Color3.new((Start_R+((Start_R-End_R)*i/100)),(Start_G+((Start_G-End_G)*i/100)),(Start_G+((Start_G-End_G)*i/100))
wait(1/255)
end
print("Done")

this confuses me a lot :/
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