|
| 19 Jan 2016 10:04 PM |
I'm currently making guis for my game and I was wondering how to make the text colors of specific guis fade from green to white SIMULTANEOUSLY. This was my very bad attempt at it, it isn't even simultaneous.
function colorFade(gui) gui.TextColor3 = Color3.new(0, 1, 0) for i = 1, 30 do gui.TextColor3 = Color3.new(gui.TextColor.r + 8/255, 1, gui.TextColor.b + 8/255) wait() end end
Help? |
|
|
| Report Abuse |
|
|
| |
|
|
| 19 Jan 2016 10:28 PM |
| What is wrong with the script you have |
|
|
| Report Abuse |
|
|
hkep
|
  |
| Joined: 19 Jul 2014 |
| Total Posts: 550 |
|
|
| 19 Jan 2016 10:29 PM |
local function Fade(Gui,Start,Stop,Div,WaitTime) Gui.TextColor = Start local Inc = (Stop - Start)/Div for i=1,Div,1 do wait(WaitTime) Gui.TextColor = Start + (Inc * i) end return nil; end
-- correct me if im wrong
Visit my thread: http://forum.roblox.com/Forum/ShowPost.aspx?PostID=181749340#182034311
|
|
|
| Report Abuse |
|
|
|
| 19 Jan 2016 10:41 PM |
@128Gig It doesn't change the color and it isn't simultaneous aka if I wanted to use that function w/ 3 different gui objects it would go one at a time instead of together.
@hkep Can't perform arithmetic operations w/ color3's, maybe w/ their value, but other than that it still errors. |
|
|
| Report Abuse |
|
|
| |
|
|
| 19 Jan 2016 11:05 PM |
It never helps your not calling the function. Unless I'm mistaken that's in another part of the script.
#Code print("Song Link: http://www.roblox.com/Deorro-vs-Swedish-House-Mafia-Save-The-5-Hours-item?id=340827217") |
|
|
| Report Abuse |
|
|
|
| 19 Jan 2016 11:10 PM |
| that's in another part of the script |
|
|
| Report Abuse |
|
|
litalela
|
  |
| Joined: 30 Mar 2010 |
| Total Posts: 6267 |
|
|
| 19 Jan 2016 11:12 PM |
from green to white?
for i = 0, .001, 1 do local color = Color3.new(1, i, i) wait() end
➳Lɪᴛᴀʟᴇʟᴀ ɪs ᴍʏ ɴᴀᴍᴇ, Lᴜᴀ ɪs ᴍʏ ɢᴀᴍᴇツ |
|
|
| Report Abuse |
|
|
litalela
|
  |
| Joined: 30 Mar 2010 |
| Total Posts: 6267 |
|
|
| 19 Jan 2016 11:13 PM |
lmao dyslexia my bad
for i = 0, .001, 1 do local color = Color3.new(i, 1, i) end
➳Lɪᴛᴀʟᴇʟᴀ ɪs ᴍʏ ɴᴀᴍᴇ, Lᴜᴀ ɪs ᴍʏ ɢᴀᴍᴇツ |
|
|
| Report Abuse |
|
|
|
| 19 Jan 2016 11:15 PM |
@litalela not changing text color on my screen
y'know what? i'm just gonna not include this color fade thingy into my script it'll make my life easier |
|
|
| Report Abuse |
|
|
| |
|
sayhisam1
|
  |
| Joined: 25 Nov 2009 |
| Total Posts: 2092 |
|
|
| 19 Jan 2016 11:32 PM |
Increase the time on your wait. It is going too fast to be seen by the human eye, or for the computer screen to even bother rendering it.
Try this code, and play around with the waits to make it faster/slower:
function colorFade(gui) gui.TextColor3 = Color3.new(0, 1, 0) for i = 1, 30 do gui.TextColor3 = Color3.new(gui.TextColor.r + 1/30, 1, gui.TextColor.b + 1/30) wait(.05) end end |
|
|
| Report Abuse |
|
|