I recently made a custom character and have outfitted it with the pathfinding script on the PathfindingService docs. I have now tried putting an accessory on the NPC (through humanoid:AddAccessory(), manually putting it in the model before and after I hit play) and as soon as it goes into the model the speed slows down.
I had a script setting the NetworkOwnership of the dummy, fixing it’s own lag/stuttering. The issue was the accessory/backpack had not had it’s NetworkOwnership changed yet, so I simply ran (not my code);
local function setNetworkOwnerOfModel(model, networkOwner)
for _, descendant in pairs(model:GetDescendants()) do
if descendant:IsA("BasePart") then
local success, errorReason = descendant:CanSetNetworkOwnership()
if success then
descendant:SetNetworkOwner(networkOwner)
else
error(errorReason)
end
end
end
end
local function equipBackpack(pack)
humanoid:AddAccessory(pack)
setNetworkOwnerOfModel(pack, nil)
end