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

How do I convert a Color3 Value to a RGB Value?

Asked by 7 years ago

So, let's say I would want to get the Red value from a Part. I would use this code:

print(game.Workspace.TestPart.Color.r)

And it would output a number like "0.1234321" or something like that.... But how would I make it so that it prints out a RGB value from 0 - 255 instead of a Color3 Value 0 - 1?

0
Do you mean BrickColor to RGB value? Mineloxer 187 — 7y

1 answer

Log in to vote
5
Answered by
CootKitty 311 Moderation Voter
7 years ago

Just multiply the value by 255.

print(game.Workspace.TestPart.Color.r*255)
0
Oh wow, didn't think of that... Thank's! MRbraveDragon 374 — 7y
Ad

Answer this question