So when I try to see if the BackgroundColor3 is a certain Color RGB(104,104,104) I get a Decimal
print (Parent.BackgroundColor3)
Return (OutPut):
0.407843, 0.407843, 0.407843.
then when I try to Check for its color, nothing happens
So when I try to see if the BackgroundColor3 is a certain Color RGB(104,104,104) I get a Decimal
print (Parent.BackgroundColor3)
Return (OutPut):
0.407843, 0.407843, 0.407843.
then when I try to Check for its color, nothing happens
As far as I know, Color3
stores the RGB values as a decimal between 0 and 1, not 0 and 255. If you were to multiply the decimals by 255, you should get what you are looking for.
The best way I can think of is by creating another Color3 with the values between 0 and 255, then comapring them:
function CompareColor(color, compare)
return color == compare
end
print(CompareColor(Parent.BackgroundColor3, Color3.new(104, 104, 104)))
-- Or just compare it like this:
if Parent.BackgroundColor3 == Color3.new(104, 104, 104) then
print("They are the same")
end