It’s basically the normal follow example?
The up and down movement is caused by a flaw in that example, JR has made an improved version of it Flowlab Game Creator - Chase Example Topdown
Tinkersmith and thebrickccentric have made some pretty good path finding examples