It seems to call the service name now. So I apologize for making this thread and it seeming like I was lying since after you made that post it worked for me.
local new_service = game:GetService("PathfindingService")
In this script you only need to declare a variable which is a reference to the PathfindingService once, you needn’t redeclare the same variable reference to the service each time the particular function is called and subsequently executed.