#Pathfinding service being wonky

1 messages · Page 1 of 1 (latest)

flint heron
#

just simple pathfinding

#
        while flag do
            wait(0.1)
            local target = findTarget(FaceStealer)
            if target and target.Character then
            
                local path = ps:CreatePath({
                    AgentRadius = 2,
                    AgentHeight = 2,
                    AgentCanJump = true,
                    AgentJumpHeight = 25,
                    AgentMaxSlope = 90,
                })
                path:ComputeAsync(FaceStealer.HumanoidRootPart.Position, target.Character.HumanoidRootPart.Position)

                if path.Status == Enum.PathStatus.Success then
                    local waypoints = path:GetWaypoints()
                    for _, waypoint in ipairs(waypoints) do
                        humanoid:MoveTo(waypoint.Position)
                        
                    end
                end
            else
                wait(0.5)
            end
        end
end)() ```
#

But it is very wonky

#

I used MoveToFinished:Wait() but it is very unreactive

tribal stratus
#

it might be getting stuck on the terrain

flint heron
#

ye