How to create Player Health

So Im trying to make it so that when my character gets hit the Health number will be displayed, and once it hits 0 my character will be destroyed. But instead it just displays the starting health value and never changes it. Also my character doesnt get destroyed.

var playerLife = 10;


function Update () {
	if(playerLife <= 0){
		Destroy(gameObject);
		}
	}
function OnCollisionEnter (col : Collision){

	if(col.gameObject.name == "enemyBullet(Clone)")
	{
		playerLife -=2;
		
		
		
		}

	}
function OnGUI()
{
	GUILayout.Label("Health: " +  playerLife);

}

So I think playerLife -= 2; is incorrect, but I’m not 100% sure. If this code doesn’t work, perhaps your game tag is incorrect.

var playerLife = 10;

function Update () 
{
	if(playerLife <= 0)
		Destroy(gameObject);
}

function OnCollisionEnter (col : Collision)
{
	if(col.gameObject.name.Equals("enemyBullet(Clone)"))
		playerLife = playerLife - 2;
}

function OnGUI()
{
	GUILayout.Label("Health: " + playerLife);
}