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?
COMMUNITY QUESTION
[NOT A REQ]How to make a Frame smoothly change colors?
3 answers
Color3:lerp(Goal, Number)
example
local oldFrameColor = Frame.BackgroundColor3
local colorGoal = Color3.fromRGB(0,0,0)
for i = 0,1,0.05 do
Frame.BackgroundColor3 = oldFrameColor:lerp(colorGoal, i)
wait()
end
:You can use a for loop to do this, for example:
local color = script.Parent.BackgroundColor3
for i = 1, 60 do
wait(0.1)
color = color + Color3.fromRGB(0, 0, 1)
end
I Recommend This If You Want A Random Colour.
Just Make A Table Like This
FrameColours = {"White","New Yeller","Candy Pink","Deep Orange"}
And Then Do A Little Script Like This
local framecolour = script.parent.BackgroundColour3
framecolour = math.random(FrameColours)
wait (5)
framecolour = math.random(FrameColours)
Note That The BackgroundColor3Varible Is Your Friend When Doing This
It's Not The Smoothest But You Can Edit This I Don't Expect Credit.
This discussion is preserved as it was. New answers, comments, and votes are closed.
