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

Simple BackgroundColor3 Problem?

Hi. I'm extremely new to GUI's and decently new to scripting as well. So I'm currently training on being better at making GUI's. Anyway, here's my problem:

--EXAMPLE:
while true and wait(1) do
frame.BackgroundColor3=frame.BackgroundColor3*BackgroundColor3.new(5,0,0)
end

I thought this would add 5 to Red every 1 second, but BackgroundColor3 is an unknown value. If I put "frame.BackgroundColor3.new" instead, it says "new" is not a valid member. I have searched for a while and found no answers or example scripts.

If you could help me with the obvious solution it would be appreciated! Thanks anyway.

1 answer

✓ Accepted answer

BackgroundColor3 is a Color3 value. There isn't a separate thing called a "BackgroundColor3" -- that's just the property's name. The constructor for a Color3 is simply Color3.new.


I also doubt you want to multiply the colors like that.


Another warning: Color3.new(r, g, b) has the three parameters between 0 and 1 rather than 0 and 255 like it shows in the Properties tab.

This discussion is preserved as it was. New answers, comments, and votes are closed.