How to judge the distance of the character when the AI moves, so as to pause or perform the AI movement


Hi guys, I plan to judge the position of the character when the AI moves, decide whether the AI continues to move, I try to get the position of the character minus the position of the AI, do not move when it is greater than 10, but there is no effect, the print is empty, what should I do? Can you have a friend who can give an idea?

Sorry, I drank too much and I found out I got the axis wrong,