the collision wont update?

I’m trying to write a script, but it just wont work

var health = 1;

static var DEAD : boolean = false;

function Update () {
Debug.Log("DEAD = " + DEAD);
}

function OnCollisionEnter (theCollision : Collision) {
	if(theCollision.gameObject.name == "Block3dCube"){
		if(health <= 0) {
		DEAD = true;
		}
		
		if (health >= 0){
		health =- 1;
		}
	}
}

every time I run the program, nothing happend when the gameobject named Block3dCube collides with the gameobject I asigned it to

my guess is that the function doesent update, how can I make it work???

What kind of physics are you using?

YourScriptsObject:
Does it have a collider? If so, what kind (sphere? charactecontroller?)
Is it set to be a trigger?
Does it have a rigidbody? If so, what are the settings? Kinematic?
Is this object moving? if so, how are you moving it? (charactercontroller.move/simplemove, transform.translate, manually editing transform, rigidbody forces…?)

Block3dCube:
Does it have a collider? If so, what kind (sphere? charactecontroller?)
Is it set to be a trigger?
Does it have a rigidbody? If so, what are the settings? Kinematic?
Is this object moving? if so, how are you moving it? (charactercontroller.move/simplemove, transform.translate, manually editing transform, rigidbody forces…?)

Someone always beats me so I have to change my answer so I don’t confuse someone (fumes)

This def sounds like you are missing a rigidbody. You need to have one on at least one of your objects for OnCollisionEnter to be triggered.

Both has a box collider
none is set to be a trigger
Block3dCube has a rigidbody (the collision detection is set to discrete, is that the problem?)

I thought the problem might be that another gameobject collides with the script object and permanently sets (var) theCollision to another gameobject