I'm trying to make it so the player can give an AI a certain area to go, and the AI will use pathfinding to get there. But for some reason, the AI outright ignores the path and tries to get to the last point possible.
Snippet:
local Path = game:GetService("PathfindingService")
local Async = Path:FindPathAsync(v.HumanoidRootPart.Position,script.Pos.Value)
if Async.Status == Enum.PathStatus.Success then
for i,p in pairs(Async:GetWaypoints()) do
print(p.Position)
local part = Instance.new("Part",workspace)
v.Humanoid:MoveTo(p.Position)
if p.Action == Enum.PathWaypointAction.Jump then
v.Humanoid.Jump = true
end
end
end

1 comment
Nevermind... I figured out the problem, I just need to wait until they got to the next point.