(Probably a quick fix) Decal color3 issue

I have a mini issue
I’m changing the color of a Decal on click using this:

script.Parent.MouseClick:Connect(function()
    game.Workspace.LED.Stageback.a.Decal.Color3 = Color3.new (252, 0, 6)
end)

It works, but the color is completely wrong. In-studio, when I color the decal manually it looks like this:
ddd

In game, when I click it looks like this:
not working

The lighting doesn’t have anything to do with it - when I change the color manually then test in studio, it looks as it should.

I can barely script at all, but if anyone knows a fix and could help out that would be greatly appreciated :slight_smile:

Your issue is on the decal if you set it manually then copy the three components which is the RGB

and set it your script

u made a new color of instance change the code to this

script.Parent.MouseClick:Connect(function()
    game.Workspace.LED.Stageback.a.Decal.Color3 = Color3.fromRGB(252, 0, 6)
end)

Use Color3.fromRGB instead of Color3.new as that only accepts a range of 0 - 1:

game.Workspace.LED.Stageback.a.Decal.Color3 = Color3.fromRGB(252, 0, 6)

Alternatively, you can divide each component by 255 with Color3.new

1 Like

Color3.fromRGB actually works with numbers from 0-255, Color3.new uses values from 0 to 1 that scale from 0-255 in the properties.

For example, doing Color3.new(1, 0, 0) is equivalent to 255, 0, 0, this can be replicated using Color3.fromRGB which you can use to do Color3.fromRGB(255, 0, 0) to accomplish the same thing.

1 Like

That’s what I’ve done, but isn’t working.

they are the colors I’m trying to use

That worked perfectly. Thank you!!

try lowering the numbers then see what you can find

Thank you very much for that, worked perfectly.