need help with enemy script

hi

i scripted a script for my enemies but it does not seem to make it so the enemy gets damaged

 var Health = 100;

function Update() 

{

if (Health <=1)

    {
     Destroy (gameObject);
    }

}

function OnCollisionEnter()
{
     if (gameObject.tag == "playerdamage")
     {
          Health -= 10;
     }

     else if (gameObject.tag == "CubeGrenade")
     {
     Health -= 100;
     return;
     }
}

i used collisions and tags on this script but when i shoot at the enemies, they dont get damaged. Can someone tell me what i am doing wrong in this scirpt?.

thanks

well, you should space out your things...

function Update() { 
if (Health <=1) { 
Destroy (gameObject); 
}

can I see your full script? I suspect your -100 isn't even activating.

http://unity3d.com/support/documentation/ScriptReference/MonoBehaviour.OnCollisionEnter.html

You need to change your collision function to something like this:

function OnCollisionEnter(collision : Collision) 
{
    if( collision.gameObject.tag == /*whatever*/ )
    {
        // etc
    }
}