ROBLOX’s pathfinding seems to keep failing calculating a pretty straightforward path from a certain distance, but if I bring the NPC above height it seems to find paths correctly…
Uploading: B.mp4…
These 2 gifs explain it pretty well using navmesh.
position = my character
root = npc
local yHeight = Root.Position.Y
local success, errorMessage = pcall(function()
local newPos = Vector3.new(position.X, yHeight, position.Z)
path:ComputeAsync(Root.CFrame.Position, newPos)
end)
if not success or path.Status ~= Enum.PathStatus.Success then
--pathFind(roamPoints.Spawn.Position, roamPoints.Spawn)
warn("Can't find a path")
return
end
The issue is not yHeight I also tried position.Y
Any suggestions?