Hi. I’ve got code:
void OnTriggerEnter(Collider other){
if(other.gameObject.CompareTag("zombie"))
{
currPlayerHealth = currPlayerHealth - 5;
}
}
And it doesn’t work. Same when I make
void OnTriggerEnter(Collider other){
if(other.gameObject.CompareTag("bullet"))
{
currPlayerHealth = currPlayerHealth - 8;
}
}
I’m writing in C#.