WHY WON'T YOU DIE?! (Why won't the OnCollisionEnter function run?)

Hi, I have a problem. See, I’m trying to make it so that when you fall in water, you die. (I don’t have Unity Pro, so I’m just using the simple water thing, adding an object under it.) Here’s the script I have:

function OnCollisionEnter(death:Collision)
{
	Debug.Log("Collide with thing");
	
	if(death.gameObject.tag == "Enemy")
	{
		Debug.Log("DIE");
		Application.LoadLevel("dead");
	}
}

Does anyone know what the problem is, and how to fix it? The object DOES have the Enemy tag. Also, this script does work with other things, like the enemies that run towards you.

Try this example

function OnTriggerEnter (other : Collider) {
    Debug.Log("Collide with thing");
    if(death.gameObject.tag == "Enemy") {
        Debug.Log("DIE");       
        Application.LoadLevel("dead");    
    }
}

this should help this is in JS

Most likely, your player’s collider’s “Is Trigger” is checked, for the sake of other functions in your game. When IsTrigger is checked, none of the OnCollision functions are called–instead, “OnTriggerEnter”, “OnTriggerStay” and “OnTriggerExit” are called.

If your “death” object uses a mesh collider, you may need to set convex to true in the Mesh Collider inspector settings.

You are using FPS Character Control. Am I right? Look this: