My custom npc dont wanna clime ladders basically, it just stops instead of trying to walk up the truss. I dont get any errors whilst running it.This is the code for the ai:
while true do
local target = getNearestTarget(observers)
local pathParams = {
AgentRadius = 8,
AgentHeight = 12,
CanJump = true
}
local path = game:GetService("PathfindingService"):CreatePath(pathParams)
path:ComputeAsync(scp.PrimaryPart.Position, target.PrimaryPart.Position)
local waypoints = path:GetWaypoints()
local waypoint = waypoints[2]
if path.Status == Enum.PathStatus.Success then
humanoid:MoveTo(waypoint.Position)
end
local blockedConnection = nil
blockedConnection = path.Blocked:Connect(function(blockedWaypointIndex)
blockedConnection:Disconnect()
humanoid:MoveTo(waypoint.Position)
end)
wait(0.25)
end