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

How can I test for a brick colour?

I have a computer that when you complete an objective, it’s screen turns green. However, I want the colour of a projector to equal the computer’s colour.

Would this Sudo code work?

MatchingColour = Computer.BrickColour

Projector.BrickColour = MatchingColour

9 comments

0

Use Enums.

0

if Brick.BrickColor == Enum.Brickcolor.ColorYouWant then do whatever.

0

^ Something like that.

0

why not just compare it with BrickColor.new()??

0

You could also just use the Color3, I just use Projector.Color3 = Color3.fromRGB(Computer.Color3)

0

I absolutely dislike brickcolor

0

Also, fellow non-American I see with "ColoUr" xDD

0

The reason this doesn't work is cause you said "BrickColur" should you should have used BrickColor.

0

Use BrickColor as british word "Colour" does not work in lua

1 answer

✓ Accepted answer

that will work if you replace BrickColour with BrickColor, but i would recommend using just Color, because you can use any color in the spectrum with Color, not just the BrickColors

Projector.Color = Computer.Color

if you want to set some Parts Color with RGB, then use

Computer.Color = Color3.fromRGB(red value,green value,blue value)

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