So what I am trying to achieve is a dummy which moves to the player until a bool value is not set to false, I am having the target of the AI to follow as the Player’s HumanoidRootPart but for some reason the NPC always stops before the NPC event touches the player:

function RunToVictim()
local NPC = script.Parent
local humanoid = NPC.Humanoid
local destination = nil
for i,v in pairs(script.Parent.Victims:GetChildren()) do
destination = v.Value
end
local path = PathfindingService:CreatePath()
print(destination)
path:ComputeAsync(NPC.HumanoidRootPart.Position,game.workspace[destination.Name].HumanoidRootPart.Position)
local waypoints = path:GetWaypoints()
for _, waypoint in pairs(waypoints) do
local part = Instance.new("Part")
part.Shape = "Ball"
part.Material = "Neon"
part.Size = Vector3.new(0.6, 0.6, 0.6)
part.Position = waypoint.Position
part.Anchored = true
part.CanCollide = false
part.Transparency = 0
part.Parent = game.Workspace
humanoid:MoveTo(waypoint.Position)
humanoid.MoveToFinished:Wait()
end
end
Edit: If I put this on a loop the NPC will move a stud and then stop again but gets to the player but not how intended.