Health bar alignment issue

I am wondering how to resize a GUItexture, so that it shrinks from the right, instead of the middle. I am assuming I will have to reposition it every step, but I want to confirm that and see if anyone has a solid method for handling this.

It’s the adjusting of the position.x, relative to the scaled size of the bar that’s getting me thus far.

	 amount = (health/1000);
//energyBar.guiTexture.pixelInset.width = (amount);
energyBar.transform.localScale.x = 1 * amount;
energyBar.transform.localPosition.x = -0.015 + (0.015*amount);

As you can see I’ve tried a couple of methods to no avail. 0.015 is it’s placement with full health.

The issue was that I was an idiot.

I didn’t get the position for when the health bar was at 1, and was instead using the same value twice.
So the value at full was 0.015 to align left, at 1 it was 0.485, making a difference of 47 even.

Thus…

 amount  = (health/1000);
 energyBar.transform.localScale.x = 1 * amount;
 energyBar.transform.localPosition.x = (-0.485)+(.47*(1*amount));