Static var wont work

The enemy health code I am using

Characterdamage2.js

static var hitPoints = 100.0;
var deadReplacement : Transform;
var dieSound : AudioClip;

function ApplyDamage (damage : float) {
	// We already have less than 0 hitpoints, maybe we got killed already?
	if (hitPoints <= 0.0)
		return;

	hitPoints -= damage;
	if (hitPoints <= 0.0)
	{
		Detonate();
	}
}

function Detonate () {
	// Destroy ourselves
	Destroy(gameObject);
	
	// Play a dying audio clip
	if (dieSound)
		AudioSource.PlayClipAtPoint(dieSound, transform.position);

	// Replace ourselves with the dead body
	if (deadReplacement) {
		var dead : Transform = Instantiate(deadReplacement, transform.position, transform.rotation);
		
		// Copy position & rotation from the old hierarchy into the dead replacement
		CopyTransformsRecurse(transform, dead);
	}
}

static function CopyTransformsRecurse (src : Transform,  dst : Transform) {
	dst.position = src.position;
	dst.rotation = src.rotation;
	
	for (var child : Transform in dst) {
		// Match the transform with the same name
		var curSrc = src.Find(child.name);
		if (curSrc)
			CopyTransformsRecurse(curSrc, child);
	}
}

Now this code in my spawning script wont work, it makes the enemies what seems like invincible

CharacterDamage2.hitPoints += 10.0;

my entire spawn code is this

var textColor = Color.red;
var NumberEnemies : int;
static var WaveNumber = 0;
var NewWave : boolean = false;
static var score = 0;

var SpawnPoints : Transform[];
var Enemies : Transform[];

function Awake () {
guiText.material.color = textColor;
}

function Update(){
NumberEnemies = ((GameObject.FindGameObjectsWithTag("Enemy").Length) - 1);


if(NumberEnemies == 0 && !NewWave){
NewWave = true;
WaveNumber += 1;
SpawnEnemies();
}
}

function SpawnEnemies(){
yield WaitForSeconds (3);
CharacterDamage2.hitPoints += 1.0;
SpawnEnemy = Instantiate(Enemies[0],SpawnPoints[0].position,SpawnPoints[0].rotation);
SpawnEnemy = Instantiate(Enemies[0],SpawnPoints[1].position,SpawnPoints[1].rotation);
SpawnEnemy = Instantiate(Enemies[0],SpawnPoints[2].position,SpawnPoints[2].rotation);
SpawnEnemy = Instantiate(Enemies[0],SpawnPoints[3].position,SpawnPoints[3].rotation);
SpawnEnemy = Instantiate(Enemies[0],SpawnPoints[4].position,SpawnPoints[4].rotation);
NewWave = false;

}

function OnGUI () {
    GUI.Box(Rect(10,15,75,35), "Score: " +score);
    GUI.Box(Rect(10,105,75,35), "Wave: " +WaveNumber);
}

You can’t use static vars like that; static means there’s only one instance of that variable regardless of how many objects are using the script. Remove static from all variables unless you actually mean for there to be one instance and fully understand all the consequences of using static.

You need to access your health variable WITHOUT using a static variable. Just remove the ‘static’ bit, and you should be good to go. If you need to actually access your health variable externally, then you need to use GetComponent();