"if it is not pursuing or no longer pursuing a player, it should find the nearest waypoint and path to it. It should follow the way points to game.workspace.Door"