Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Simple BackgroundColor3 Problem?

Asked by
Qorm 100
9 years ago

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

Log in to vote
2
Answered by
BlueTaslem 18071 Moderation Voter Administrator Community Moderator Super Administrator
9 years ago

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.

Ad

Answer this question