Network Owner not working on tool?

I have a problem when I set my NPC network. When I set the network owner, it errors.
Network Ownership API cannot be called on Anchored parts or parts welded to Anchored parts.


My other NPC’s work but not this one.

local character = script.Parent

for i,v in ipairs(character:GetDescendants()) do
	if v:IsA("BasePart") and v.Anchored == false then
		v:SetNetworkOwner(nil)
	end
end
2 Likes

i think this is because the body part is welded to other bodypart. just set network owner of the entire character.

character:SetNetworkOwner(nil)

I don’t think setting the whole model would work. It errors.

1 Like

it should works. give it a try

1 Like

This worked for me:

local character = script.Parent

for i,v in ipairs(character:GetDescendants()) do
	if v:IsA("BasePart") and v.Anchored == false then
		for _, parts in ipairs(v:GetConnectedParts(true)) do
			parts:SetNetworkOwner(nil)
		end
	end
end
2 Likes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.