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

Why doesn't BackgroundColor3 get set correctly with this script?

Asked by 9 years ago

print(BrickColor.Random().Color)

Prints a random Color3 value like I need, but..

Frame.BackgroundColor3 = Color3.new(BrickColor.Random().Color)

Only colors black?

Also, I know this is not efficient , I just need help with some notation.

1 answer

Log in to vote
1
Answered by 9 years ago

You don't need the Color3.new() surrounding the BrickColor's Color since the property already holds a Color3 as a value. All you really need to do is set the BackgroundColor3 to that Color property like so:

Frame.BackgroundColor3 = BrickColor.Random().Color

I hope my answer helped you. If it did, be sure to accept it.

Ad

Answer this question