I want it to like fade to a certain colour.
This is what i tried:
local frame = script.Parent
r = 255
g = 62
b = 62
repeat
g = g + 1
b = b + 1
frame.BackgroundColor3 = (r, b, g)
wait()
until e == 255
I want it to like fade to a certain colour.
This is what i tried:
local frame = script.Parent
r = 255
g = 62
b = 62
repeat
g = g + 1
b = b + 1
frame.BackgroundColor3 = (r, b, g)
wait()
until e == 255
You can't group 3 numbers like (r, g, b) -- Lua doesn't know what do with more than one value. You have to explicitly package them up.
This pattern of packaging up a bunch of values is called a constructor. The constructor for Color3 values is Color3.new(r, g, b)
frame.BackgroundColor3 = Color3.new( r / 255, g / 255, b / 255 )
This discussion is preserved as it was. New answers, comments, and votes are closed.
2 comments
*(r/255, b/255, g/255)
You can edit your posts.