When I destroy an enemy, it drops a health box meant to restore the health of a player.
I am trying to get it to where if the player comes in contact with the health box, the box gets destroyed. this is the code I have so far but it doesn’t seem to be updating because I’m not getting the log in my console.
var healthDrop : Transform;
function OnCollisionEnter (col : Collision)
{
Debug.Log("activated");
if (col.collider.tag == "healthDrop")
{
Destroy(healthDrop);
}
}