Thanks for your report. We have identified the issue and should have a fix coming out in the next several weeks. If you need a workaround for this issue before this happens you can fix it yourself by manually setting Humanoid.WalkToPart = nil before calling Humanoid:MoveTo.
Here is a snippet of your repro code with the work around for reference:
function moveTo(playerPart)
if playerPart == nil then
-- walk randomly around the court
local x = math.random(xMin, xMax)
local z = math.random(zMin, zMax)
local targetPosition = Vector3.new(x, yPosition + 2,z)
moveTargetMarker.Position = targetPosition
npcHumanoid.WalkToPart = nil -- Work around here!
npcHumanoid:MoveTo(targetPosition)
local offset = targetPosition - courtSurface.Position
print("Random moveTo(" .. tostring(offset) .. ")")
return
end
npcHumanoid:MoveTo(playerPart.Position, playerPart)
print("moveTo(" .. tostring(playerPart.Position) .. "," .. tostring(playerPart) .. ")")
return true
end