so i tried fixing my own problem because somebody in the comment told me to do so in my last post without giving any explanation and it failed poorly after 1 hour and i have come to realize i can not fix a problem that i cant understand even if somebody thinks you do
code
local PathFindingService = game:GetService("PathfindingService")
local Path = PathFindingService:CreatePath()
local Humanoid = script.Parent.Humanoid
local HumanoidRootPart = script.Parent.HumanoidRootPart
local Destination = Vector3.new(math.random(-50,200),0,math.random(-50,200))
Path:ComputeAsync(HumanoidRootPart.Position, Destination)
local WayPoints = Path:GetWaypoints()
for i, WayPoint in pairs(WayPoints) do
if WayPoint.Action == Enum.PathWaypointAction.Jump then
Humanoid.Jump = true
end
Humanoid:MoveTo(WayPoint.Position)
Humanoid.MoveToFinished:Wait()
end

1 comment
the code only moves the AI once but i have no idea how to move it again over and over