Hey im building and rpg game and this script does’nt work its supposed to damage the Npc but doesnt work
public GameObject Ork;
private OrcHealth Hps;
void Start ()
{
Hps = Ork.GetComponent<OrcHealth>();
}
void OnCollisionEnter (Collision Col)
{
if(Col.gameObject.name == "Icon");
{
Debug.Log("Ork Got Hit");
Hps.HpOrc = Hps.HpOrc - 1;
}
}
Help?