I currently use ComputeAsync for my NPC’s pathfindings and I suddenly stumbled upon this weird thing about it where moving certain parts changes which part they take?
Is there a way I can perhaps like set it up so they take the quickest way possible to certain position?
for _, waypoint in waypoints do
local path = PathfindingService:CreatePath({
AgentRadius = 2,
AgentHeight = 2.5,
AgentCanJump = true
})
path:ComputeAsync(enemy.PrimaryPart.Position, waypoint.point.Position)
if path.Status == Enum.PathStatus.Success then
local waypoints = path:GetWaypoints()
for _, point in waypoints do
Humanoid:MoveTo(point.Position)
Humanoid.MoveToFinished:Wait()
end
end
end