GUI Resizing Issues

I have a custom health bar UI that is supposed to shrink upon losing health, as any regular health bar would. The problem I have is that when I shrink the bar on the X axis, both sides get pulled inwards. However, I want to make it so the left side stays in the same place, and only the right side moves when being resized.

Make that everytime HealthBar’s X axis gets reduced, reduce HealthBar’s position X axis too.

That’s a very hacky fix, and I’m not sure how I’d even calculate that.

set the anchor point of your frame to 0, 0.5