Help with basic enemy health script!!!

Hello all!

I am creating a survival based game based off of this Youtube video: http://www.youtube.com/watch?v=FKT7jIW6ORU

I am at the point where I am making a script for enemy health, but after I made it, when I go to attack the enemy nothing happens!
Here is my script (yes i know it is basic :smile:)

var Health = 100;

function ApplyDammage (TheDammage : int)
{
Health -= TheDammage;
}

Is there anything I can do to get this working?

Thanks!
Dylan

You realise you need to call that function from somewhere else, preferably an OnTriggerEnter() or OnCollision() right? A good way to check if the function is actually being called is to place a print inside of it.

print("this happened.");