I know how to make them randomly change colors, but not smoothly.. Any tips on how to make them smoothly change, or would I have to use multiple parts?
Color3:lerp(Goal, Number)
example
1 | local oldFrameColor = Frame.BackgroundColor 3 |
2 | local colorGoal = Color 3. fromRGB( 0 , 0 , 0 ) |
3 |
4 | for i = 0 , 1 , 0.05 do |
5 | Frame.BackgroundColor 3 = oldFrameColor:lerp(colorGoal, i) |
6 | wait() |
7 | end |
https://wiki.roblox.com/index.php?title=API:Color3
:You can use a for loop to do this, for example:
1 | local color = script.Parent.BackgroundColor 3 |
2 | for i = 1 , 60 do |
3 | wait( 0.1 ) |
4 | color = color + Color 3. fromRGB( 0 , 0 , 1 ) |
5 | end |
I Recommend This If You Want A Random Colour.
Just Make A Table
Like This
1 | FrameColours = { "White" , "New Yeller" , "Candy Pink" , "Deep Orange" } |
And Then Do A Little Script Like This
1 | local framecolour = script.parent.BackgroundColour 3 |
2 | framecolour = math.random(FrameColours) |
3 | wait ( 5 ) |
4 | framecolour = math.random(FrameColours) |
Note That The BackgroundColor3
Varible Is Your Friend When Doing This
It's Not The Smoothest But You Can Edit This I Don't Expect Credit.