The less health, the less saturation

im sure that this is pretty simple, but basically i want the saturation to go down as health goes down. for example, at 100 health saturation would be 0, at 75 health it could be around -.75. im guessing this has to due with something like game.Lighting.ColorCorrection.Saturation = health / -100.

3 Likes

You could do 1/health to make sure it stays between 1 and 0, or multiply that by -1 to keep it between -1 and 0

1 Like

doesnt work, here is what i did game.Lighting.ColorCorrection.Saturation = 1 / health * -1
(also tried other variations, none of them worked, and doing that also resulted in when the player dies saturation would go to -inf)

1 Like

right now, the closest i get is this:

hum.HealthChanged:Connect(function(health)
	game.Lighting.ColorCorrection.Saturation = health / 100
	print(game.Lighting.ColorCorrection.Saturation)
end)

the only problem with that is right when health changes the saturation will instantly start at 1 and go down from there)

1 Like
game.Lighting.ColorCorrection.Saturation = health / 100

add a - 1 to health / 100 if you want it to go up to -1, or 1 - if you want it to go up to 1
health / 100 - 1 means it will go from 0 to -1
1 - health / 100 means it will go from 0 to 1, though from your title, you wanted to have less saturation instead

hopefully what i said made sense

3 Likes

Try adding checker like Humanoid.Died:Connect(function()

2 Likes