How to make this GUITexture work.

I want it where the green bar will decrease as my health goes down. The red is the background the shield as you probably know is the outside. So I only want the green to move. So how I want this to work is I have a script that the enemy will shoot raycast and my guy gets hurt. Here’s my hurt part in my health, if(isHit){
health -= 5.0f;
SetHealthText();
isHit = false;
}
so I need it where when I get hit the green bar will go all the down if I get hit 20 times, wich will deduct the 5.0. I really need help with this. And thank you too.

21526-shield.png

This question was answered by Eric5h5 here: