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

How Do I Convert RGB to BrickColor?

Asked by
WishXVI 94
3 years ago

I'm trying to change alot of parts to a certain color but it changes it to white. I know it has to do with brickcolor and rgb conversion but

for _, v in pairs (game.workspace:GetDescendants())do
    if v.Name == 'A' and v:IsA'BasePart' then 
          v.BrickColor = BrickColor.new(106, 57, 9)
    end
end

Turns it white and yet (0.9,0.6,0.2) is a orangeish color. How do I convert my RGB value to work with brickcolor?

1 answer

Log in to vote
0
Answered by
WishXVI 94
3 years ago

Oh I just have to divide my RGB by 255. Thanks to anyone who saw this!

0
You could do BrickColor.new(Color3.fromRGB(106, 57, 9)) RAFA1608 543 — 3y
Ad

Answer this question