I am trying to make a ranged NPC. What I am trying to accomplish is to have an enemy NPC that goes near the player but stays a few studs away. I thought I found a method on how to do it but for some reason pathfinding service returns it’s status as nopath whenever I attempt to. As soon as I edit the script to just moving all the way to the character it suddenly works. I don’t know why this happens. Does anyone have any insight why/ a better method on how to do it with pathfindingservice?
--Script for ranged NPC computing pathtotarget:ComputeAsync(npc.HumanoidRootPart.Position,CFrame.new(npc.HumanoidRootPart.Position, target.HumanoidRootPart.Position).LookVector*50)```