Specific enemy variable affects all enemies

All the enemies in my game have health and on collision with the player, they subtract their current level of health from the players.

The problem is that if the player reduces one of their health to zero, all of them disappear. At the same time, if I set their health to private variable, the health won't sutbract from the enemies health on collision.

public var Health: int = 100;

function OnCollisionEnter(other: Collision){
if(other.gameObject.CompareTag("Player")){
other.gameObject.Health -= Health;
Destroy(gameObject);
rigidbody.velocity = -rigidbody.velocity; 
}

I'm not sure if this is exactly what you're looking for, but it should at least give you an idea as to how to go about modifying variables in other scripts without using static vars. If this script is attached to an enemy object any time it comes into contact with the player it will subtract it's current health from the player then self destruct.

http://unity3d.com/support/documentation/ScriptReference/Component.GetComponent.html

var enemyHealth : int;

function OnCollisionEnter(col : Collision)
{
    if(col.gameObject.CompareTag("Player"))
    {
        var tempScript = col.gameObject.GetComponent("name of script that handles health");
        tempScript.health -= enemyHealth;
        Destroy(gameObject);
    }
}

In Java, their are things called getter/setter methods, which are private, to access private variables...

So, try making it private, and then add in a setter method, that brings in the damage, and then subtract it and set it there.

Make sure it's not static too...

Um, can't think of anything else right now, but you can try this =).