Pathfinding problems

Try this code I wrote a while ago, it has logic for player chase and detection but you can just remove all that and just have it pathfinding between diffident points