I am trying to make it so that the dog barks when it can't get to its target but for some reason the animation does not play and it gets stuck on the first frame.
Develop games in your browser. Powerful, performant & highly capable.
Probably because it gets restarted on every tick.
Try adding another condition to event #19:
Dog animation "Bark" is NOT playing