Im making a pathfinding AI and it works alright for the main part, but for some reason when i go upstairs the npc stops computing the path correctly.
while wait() do
local Path = PS:CreatePath({AgentRadius = 3.25,AgentCanJump = true})
Path:ComputeAsync(hrp.Position, thiefRoot.Position)
local waypoints = Path:GetWaypoints()
print(1)
if npc.LocatedThief.Value == true then
for i,waypoint in pairs(waypoints) do
print(2)
if i == 2 then
print(3)
hum:MoveTo(waypoint.Position)
wait(.15)
end
end
end
end
The npc.LocatedThief value is not the issue, as the green cube on screen indicates that the value is true
I am really unexperienced with pathfinding so i have no idea what the problem might be.