Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

GUI colour change?

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

2 comments

0

*(r/255, b/255, g/255)

0

You can edit your posts.

1 answer

✓ Accepted answer

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.