I have my 2 scripts. 1 sends a message Apply Damage when it collides with the trigger. but the goblin I’m fighting does not receive any damage.
attack script
function OnTriggerEnter(other : Collider)
{
SendMessage("ApplyDamage", Dammage, SendMessageOptions.DontRequireReceiver);
Debug.Log("HI");
}
Enemy Script
function ApplyDamage()
{
animation.Play("block_hit");
animation.Stop("attack1");
chasing = false;
Hurt = 2;
Health -= Wscript.Dammage;
Debug.Log("Enemey Hit");
yield WaitForSeconds(DammageDelay);
Hurt = 1;
}