How do I make a gradient that gets more visible based on health?

Hey, I was wondering how I could make a gradient that progessively got more visible the lower your health is. I know that I can use TweenService for a smooth transition for the gradient, but how would I detect the health progressively getting lower?

If anyone has any ideas, please list them.

2 Likes

what do you mean more visible

you can get health percentage with health/maxHealth and then change the gradient’s offset/transparency to that

1 Like

For example, if the player is losing health the gradient becomes more visible.

1 Like

Covert each color in the color sequence to a HSV tuple. To make it invisible, S (saturation) should equal 0, and V (value) should equal 1. As the health changes, make S and V move towards their intended end values.

1 Like