How to change the Health UI according to how much HP the user has?

Aye! I should have mentioned it. Make the array as large as it needs to be. But do not allow the index to climb too high until the player’s health pool has increased.


There are other, more explicit ways to do it, but this seems more than feasible.