hi guys i am going insane with this code althought its sure a very newbie code to you
here it is and thanks in advance
code:
#pragma strict
var health : int = 100;
function Update () {
}
function OnCollisionEnter(theCollision : Collision){
if(theCollision.gameObject.tag == "Enemy")
health -=10;
}
i put it to my player and enemy but the enemy is not losing any health
my bullet and enemy has a collider.