I used a slider as a health bar.
Values go from 0 to max health of the player.
Now when the player takes damage I want to decrease the slider value to new health value but I want slider to finish moving in a certain second.
If the player takes 20 damage, the slider value decrease in 3 seconds.
If the player takes 80 damage, again slider value decrease in 3 seconds.
All the examples of sliders I could find were the exact opposite of what I want, bigger the gap between values it take longer to finish but I don’t want this.