How do I make overlapping Health Bars?

I’ve tried things like This and This, but I have not had success with making them work the way I want them to work.

First, I want to have two health bars, with one overlap the other like this picture - alt text.

Maybe I’ve been doing it wrong, but I felt it would be better to at least ask rather than sit around frustrated.

If you’re using GUI you can do it using different depths in your GUI.

public GUITexture redHealthbar;
public GUITexture greenHealthbar;

int health = 100;

void OnGUI() {
     GUI.depth = 1;
     GUI.DrawTexture(new Rect(10, 10, 100, 30), redHealthbar);
     GUI.depth = 0;
     GUI.DrawTexture(new Rect(10, 10, health, 30), greenHealthbar);
}

“GUI elements drawn with lower depth values will appear on top of elements with higher values (ie, you can think of the depth as “distance” from the camera).”
http://docs.unity3d.com/ScriptReference/GUI-depth.html