Health gui problems...

Hello, I’m trying to figure out how to assign a string to my gui text. I’ve already tried this

function Start () {
}

var go = GetComponent("currentHealth");

function Update () {

var chealth = go.ToString();

guiText.text = chealth;


}

but when I enter the game the gui says “null”. For some reason it isn’t getting access to my health script. The health script isn’t attached to the gui. How do I access the health script correctly? I’ve already tried a few other ways but nothing teems to work. :confused:

var whatever : OtherScriptName ;

function Start(){
   whatever = gameObject.GetComponent(OtherScriptName) as OtherScriptName ;
} 
 

that gets you the script, now to get a variable from that script

e.g. 

var chealth = whatever.health.ToString() ;