Getting opposite direction on a path from a player

Hey, I’m currently working on an AI system, and Im trying to find a way to have the AI run the opposite direction of a player but on a path

Example:

what would be the best way to go about doing this?

Nevermind, shouldn’t have made this post so soon. :sweat_smile:

If anyone is wondering what I ended up doing:
First, find the point on the AI’s path that is closest to the player. Then get the AI’s closest point. If the closest point the player is larger my AI’s, then go backwards. Else, go forwards.

I was by far overthinking this…