Accessing and using another objects script variable

I am trying to make a life counter.
I have used the premade 3rd person controller that comes with unity and named it “PersonController”.

I have attached the following script (called LifeCounterPlayer) to it:

static var lifeCounter : int = 3;

function OnCollisionEnter (otherObject : Collision) {
if (otherObject.gameObject.tag == “enemy”){
lifeCounter --;
}
}

I have then created a GuiText called “GuiLifeCounter”. I am not sure how to gain access to the variable “lifeCounter” and display it in this guiText. I have tried the following:

function Update () {
var playersLife = PersonController.GetComponent(“lifeCounter”);
guiText.text = "Players Life = " + playersLife;
}

Next I will try and have a guiTexture that displays the lives. eg - one heart in the top left corner for each life the player has. If someone has seen a tutorial video or some other type of tutorial that will help, I would really apprieciate it.

Thanks for the help.

I am just going to give my own example here.

Script1:

var aNumber : int = 0;

Script2:

var otherObject : GameObject;

function Update () {

otherObject.GetComponent(“Script1”).aNumber += 1;

}

I hope this helped you!