SetTrigger Only Works In Start and Not OnTriggerEnter

I'm having an issue with my animator for an enemy, where a bite animation should trigger when the enemy collides with the player. Weirdly enough, the sound effect for the bite activates, but the trigger doesn't change.

It only works in start for when I set the initial trigger, but I can do that in the animator tab anyway, so it's unnecessary.

There is only one major hitch I can think of, which is that the player's collider isn't set as a trigger, but for some reason the game detects the collision anyway when I put a debug.log in to see if it's working.

Nothing is popping up as an error in the console.

Here is the code. Ignore anything that's commented out, as it's not commented out in my version. It's just for the sake of posterity.

void OnTriggerEnter(Collider other)
{
//if (other.gameObject.CompareTag("Melee"))
//{
//    PhysicalAttack physicalAttack = other.GetComponent<PhysicalAttack>();
//    if (physicalAttack.attack == true)
//    {
//        physicalAttack.attack = false;
//        //Debug.Log(physicalAttack.attack);
//        Damage(physicalAttack.damage);
//        transform.Translate(0, 0, -5);
//    }
//}
else if (other.gameObject.CompareTag("Player") && canAttack)
{
Debug.Log("collision");
Animator anim = gameObject.GetComponent<Animator>();
//fishHealth fish = other.gameObject.GetComponent<fishHealth>();
anim.ResetTrigger("Not Attacking");
anim.SetTrigger("Attacking");
//fish.currentPlayerHealth -= 10;
GetComponent<AudioSource>().clip = Bite;
GetComponent<AudioSource>().Play();
//StartCoroutine(DamageDelay());
}


Here are some screenshots of info from the animator.

New contributor
Kit K is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.