Hello developers. I am really new to the PathFinding service and what my main goal is to make it so When calculating a path, it also considers the Humanoid’s Walk speed and JumpHeight of the Dummy. I have tried looking at other dev forums, YouTube Tutorials and https://create.roblox.com/docs/reference/engine/classes/PathfindingService#agent-params But I can’t seem to find the answer (Which it could be right in front of me… Again, I haven’t really done anything on the Pathfinding service before this). As of right now, If the Jump is too high, the Dummy doesn’t even jump or try for it, and this is really important as I am trying to make the Dummy do an Obby with different Walkspeeds and Jump Heights. Below is my code in a function and any help is appreciated!
local function GetPaths(Part)
local pathwayservice = game:GetService("PathfindingService")
local path = pathwayservice:CreatePath()
path:ComputeAsync(script.Parent.HumanoidRootPart.Position, Part.Position)
local Points = path:GetWaypoints()
for i, Point in pairs(Points) do
if Point.Action == Enum.PathWaypointAction.Jump then
script.Parent.Humanoid:ChangeState(Enum.HumanoidStateType.Jumping)
end
script.Parent.Humanoid:MoveTo(Point.Position)
script.Parent.Humanoid.MoveToFinished:Wait(2)
end
script.Parent.Humanoid:MoveTo(Part.Position)
script.Parent.Humanoid.MoveToFinished:Wait()
return "Done"
end