Hi guys i have a very simple script for my enemies health. But it just doesn’t seem to work
var health : int = 100;
function OnCollisionEnter (hit : Collision)
{
if(hit.gameObject.tag == "Bottle")
{
health -= 25;
Debug.Log (health);
if (health <= 0);
Destroy(hit.gameObject);
}
}
Could someone please shed some light into this