I used to start the attackers walking
on the lizard script .
private void OnTriggerExit2D(Collider2D other)
{
Debug.Log("no hit");
GetComponent<attacker>().NotAttacking();
}
attacker script
public void NotAttacking ()
{
GetComponent<Animator>().SetBool("IsAttacking", false);
}