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

How to make brick change to a custom color?

I want to be able to change a brick color to a color of my choice, rather than Roblox's default colors. But I'm not sure how.

So how would I take something like this...

script.Parent.BrickColor = BrickColor.new("Really red")

and change it to something custom like ("90, 129, 255") ?

2 answers

✓ Accepted answer

poppeyhead's answer does WORK, but not the best. Color3.fromRGB() takes 3 args, R, G, and B. Each being a value from 0-255, eliminating the need to divide by 255.

1 comment

0

You're right, I think I prefer this method. Thanks for you input :)

Instead of script.Parent.BrickColor = BrickColor.new("Really red") you would make BrickColor.new into Color3.new. Then you would get the Color not the BrickColor instead. Last, you would put your numbers out of 255. It would look something like this if you used that color you provided.

script.Parent.Color = Color3.new(90/255, 129/255, 255/255)

If you wanted to change the color change the number/255.

3 comments

0

Right. Because ROBLOX recently added a Color option to parts, you are able to set a Color3 value to it.

0

Thank you very much!

0

You are correct, thank you

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