Tint Color doesnt Change

Hello other devs so what I am trying to do is that on a part touch
the Tint Color Changes but Its not working how I expected and I didnt
got any errors in the output but maybe you can help

Have a great day :+1:

1 Like

How are you expecting it to work? And what exactly is the issue? From the code you’ve sent i don’t see anything wrong other than the fact you’re missing a debounce variable to prevent .Touched from being able to run several times in a very short period of time.

1 Like

That When I touch the part the colors switch from red (255, 0, 0) to white (255, 255, 255) this is what I expected

1 Like

Try just replacing OnPartTouch with OnTouch in both lines.

didn’t work too I am also just wondering why nothing is showing in the output?

Change TintColor to just Color?

Edit: nevermind this is a colorcorrection

Is this script in the part being touched?

Your problem is that you are setting light equal to TintColor.

You need to define light as game.Lighting.ColorCorrection, then set it like so:

light.TintColor = Color3.fromRGB(x,x,x)
1 Like

@frriend is correct.

Also, do you want it when the part is touched or clicked? If touched, then make sure part is anchored… if clicked, then you will need to add click detector.