Denote Valid Type

Hello, I am unaware to find the issues in this script. The error’s I receive seem to be on the following lines,
and I have tried everything at this point I try. : /

healthBarScript = guiHealth.GetComponent(“HealthBarScript”);

and

private var healthBarScript: HealthBarScript;

#pragma strict

private var guiHealth : GameObject;
private var healthBarScript: HealthBarScript;

/*
Start is called only once in the lifetime of 
the behavior. So, it's a good place to initialize 
things only once.
*/
function Start() {
	
	guiHealth = GameObject.Find("GUI Health");
    healthBarScript = guiHealth.GetComponent("HealthBarScript");
    
    // Set initial value of the health...
    
    // Uncomment the line below and call reduceHealth() in the Update() method to watch health decrease
    healthBarScript.healthWidth = 199;
    
    // Uncomment the line below and call increaseHealth() in the Update() method to watch health increase
    // healthBarScript.healthWidth = -8;
    
}


function Update() {
     
   	reduceHealth();
   	
   	//increaseHealth();
   	
}

/*
Only decrease the health bar if it's greater than the min width it should ever be;
because we do not want it decreased beyond the left of its frame.
*/
function reduceHealth() {
   if(healthBarScript.healthWidth > -8) {
       healthBarScript.healthWidth = healthBarScript.healthWidth - 1;
   }   
}

/*
Only increase the health bar if it's less than the max width it should ever be;
because we do not want it stretched out beyond its frame.
*/
function increaseHealth() {
   if(healthBarScript.healthWidth < 199) {
       healthBarScript.healthWidth = healthBarScript.healthWidth + 1;
   }
}

To solve this problem you can either cast the result:

healthBarScript = (HealthBarScript) guiHealth.GetComponent("HealthBarScript");

A better solution is to use the generic form:

healthBarScript = guiHealth.GetComponent<HealthBarScript>();