my problem is, i want to make my player possibility to damage the ennemy and kill them so i make a script when ennemy touch player it hurt them. Please help ?

Enemy Health Script :

Code:

var Health = 100;
var deadReplacement : Rigidbody;
var GOPos : GameObject;

function ApplyDamage (TheDamage : float) {
   if (Health <= 0.0)
      return;

   // Apply damage
   Health -= TheDamage;
   // Are we dead?
   if (Health <= 0)
      Replace();
}

function Replace() {

   // If we have a dead barrel then replace ourselves with it!
   if (deadReplacement) {
      var dead : Rigidbody = Instantiate(deadReplacement, GOPos.transform.position, GOPos.transform.rotation);
      // For better effect we assign the same velocity to the exploded barrel
      dead.rigidbody.velocity = rigidbody.velocity;
      dead.angularVelocity = rigidbody.angularVelocity;
    }
   // Destroy ourselves
   Destroy(gameObject);
}