After a few calls to Humanoid:MoveTo(Vector3, Part), and around 30 calls to Humanoid:MoveTo(Vector3), the later call starts moving the humanoid to an incorrect position. As further calls are made the humanoid moves to a position that is further and further away from the requested position.
It happens 100% of the time, within 20 to 50 seconds.
I’ve placed a red marker to show the requested position:
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
I am in the process of checking over bug reports and following up on some bugs that haven’t received any activity in a while.
Is this issue still occurring or can you confirm that this bug has been resolved?