You gotta do something like:
Health & HealthMax
approach. 2 attributes basically.
And you’re gonna set the progress bar’s value to:
Health / HealthMax.
Whenever you level up, you’ll increase HealthMax. If you want (most games do), you can also increase current Health too (Health = HealthMax). There will be times where you want to increase HealthMax and not increase Health.
In general:
(Attribute - AttributeMin) / (AttributeMax - AttributeMin)
would be better progress bar percentage, if you ever wanna limit the minimum values too.
If not, stick with:
Attribute / AttributeMax.
ps: just make sure min & max values are not the same (division by zero error).