Remember that if you use sprite for the health bar, with the given method this will scale the sprite.
If you want it to be shortened/lengthened then use Tiled background for it.
In Tiled background properties you can find "hotspot", this defines how the object width is changed, experiment with it to see how it works.