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 » Scripters
Home Search
 

Re: What's the most efficient way to make a rainbow gui?

Previous Thread :: Next Thread 
championbuilder is online. championbuilder
Joined: 20 Jan 2009
Total Posts: 13544
13 Mar 2015 01:40 PM
I've never done this before, and I know for sure this is bad lol.

r = true
g = false
b = false

red = 1
green = 0
blue = 1

while true do
if r == true then
red = red + 0.05
blue = blue - 0.05
if red >= 1 then
r = false
g = true
end
elseif g == true then
green = green + 0.05
red = red - 0.05
if green >= 1 then
g = false
b = true
end
elseif b == true then
blue = blue + 0.05
green = green - 0.05
if blue >= 1 then
b = false
r = true
end
end
end
Report Abuse
championbuilder is online. championbuilder
Joined: 20 Jan 2009
Total Posts: 13544
13 Mar 2015 01:41 PM
Oops didn't copy the wait()
Report Abuse
Roblok1 is not online. Roblok1
Joined: 27 Jul 2011
Total Posts: 2019
13 Mar 2015 01:44 PM
add a imageLabel with a rainbow image
Report Abuse
championbuilder is online. championbuilder
Joined: 20 Jan 2009
Total Posts: 13544
13 Mar 2015 01:45 PM
*facepalm*

I mean have the colours transition very smoothly.
Report Abuse
CrescentJade is not online. CrescentJade
Joined: 07 Jul 2010
Total Posts: 5494
13 Mar 2015 01:48 PM
Ill do this later if you still want.
Report Abuse
BothAngles is not online. BothAngles
Joined: 01 Dec 2011
Total Posts: 9604
13 Mar 2015 01:48 PM
yes if u can
Report Abuse
Roblok1 is not online. Roblok1
Joined: 27 Jul 2011
Total Posts: 2019
13 Mar 2015 01:53 PM
a loop and a table of rainbow colors. here is an example:

colors = {"Bright red", "Bright blue", "Bright green", "Bright yellow"}

-- asuming the rainbow is starting at the top


for i, v in pairs (colors) do
gui = tempColor:Clone()
gui.BackgroundColor3.new(v.color)

-- reset of the code
end

-- idk how a real rainbow works. this is just my thought process
Report Abuse
BothAngles is not online. BothAngles
Joined: 01 Dec 2011
Total Posts: 9604
13 Mar 2015 01:54 PM
roblok this should help you

http://wiki.roblox.com/index.php?title=Absolute_beginner%27s_guide_to_scripting
Report Abuse
CrescentJade is not online. CrescentJade
Joined: 07 Jul 2010
Total Posts: 5494
13 Mar 2015 01:55 PM
tbh i dont know wut ur doing.
Report Abuse
JOJObuddy011 is not online. JOJObuddy011
Joined: 27 Sep 2012
Total Posts: 840
13 Mar 2015 02:08 PM
http://www.roblox.com/Rainow-Gui-item?id=226095386

( ͡° ͜ʖ ͡°) Every 60 seconds in Africa, a minute passes. Together we can stop this. Please spread the word ( ͡° ͜ʖ ͡°)
Report Abuse
CrescentJade is not online. CrescentJade
Joined: 07 Jul 2010
Total Posts: 5494
13 Mar 2015 02:11 PM
Dont do if r == true, do if not not r
Report Abuse
anaIyze is not online. anaIyze
Joined: 29 May 2014
Total Posts: 2048
13 Mar 2015 02:20 PM
you can loop through the colors


local gui=script.Parent;
local frame=gui.Frame;
local rt=false;
local shift=.1;
b1,b2,b3=frame.BackgroundColor3.r,frame.BackgroundColor3.g,frame.BackgroundColor3.b;
coroutine.create(function(Hue) rt=true;
while(wait())and rt==true)do wait();
for i=1,10 do wait();
frame.BackgroundColor3=Color3.new(b1+shift,b2,b3);
for i=1,10 do wait();
frame.BackgroundColor3=Color3.new(b1,b2+shift,b3);
end;
for i=1,10 do wait();
frame.BackgroundColor3=Color3.new(b1,b2,b3+shift);
end;
for i=1,10 do wait();
frame.BackgroundColor3=Color3.new(b1-shift,b2,b3);
end;
for i=1,10 do wait();
frame.BackgroundColor3=Color3.new(b1,b2-shift,b3);
end;
for i=1,10 do wait();
frame.BackgroundColor3=Color3.new(b1,b2,b3-shift);
end;
end;
end);
coroutine.resume(Hue);

untested
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • 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