How to calculate AI direction and play animation

I am working on a side scrolling game and have an animated enemy AI character. I am currently working on the Anim blueprint and have become very stuck with an animation transition rule.

I have two animations that I am trying to implement. Firstly, the enemy digs into the ground and disappears; secondly, the enemy digs out of the ground and reappears.

I want these animations to take part when the enemy would need to change direction.

For example, you are running along the platform and see the enemy coming towards you, you then jump over the enemy and the enemy is now facing in the wrong direction. ← it’s at this point, I would want the first animation to take place.

I tried to get the forward vector and compare it against the players location on the same axis, but, this didin’t work. I am truly stuck with this one.

This is what I have been trying, but, to no avail…

Please don’t waste time trying to answer this one. I have already figured it out and everything is now working as it should.