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

Not sure how to get a BrickColor value from BackgroundColor3; advice?

Asked by
jtefurd 50
9 years ago

I'm developing a paintool with 64 TextButtons, each button has an individual roblox BrickColor set as it's BackgroundColor3. Now in my script I need to get a BrickColor value from the the TextButton's BackgroundColor3.
I've had previous answers recieved on the forums that failed to fix my issue. These suggestions include:

local bc = BrickColor.new(TextButton.BackgroundColor3.Color)

local bc = TextButton.BackgroundColor3.Color

Also my gratitude in advance for any help. :)

2 answers

Log in to vote
2
Answered by
Merely 2122 Moderation Voter Community Moderator
9 years ago

BrickColor has a number of constructors that take different parameters. One of these constructors takes a Color3 object.

local bc = BrickColor.new(TextButton.BackgroundColor3)

More information on the BrickColor wiki article

Ad
Log in to vote
-1
Answered by
iLegitus 130
9 years ago

BrickColor for GUI's should be Color3.new

Hope i helped.

Answer this question