percentage health bar

hi, is there a way to make a GUI percentage health bar? i have the script to lose health is there a way to make it start at 100% and go down 10 on every OnTriggerEnter that collides with my tag "evil shot" thanks all!!!

var Health = 100;

static var dead = false;

function Update() {

if (Health <=1)

    dead = true;   


function OnTriggerEnter(hit : Collider){

if(hit.gameObject.tag == "evil shoot")

{ Health -= 10;




function LateUpdate()

{ if(dead)


    transform.position = Vector3(3386.499,211.0097,707.7693);

    dead = false;



So you need to translate the numbers into a health bar? This video should help:

Good luck!


NOTE: I did not make the video.