Network Ownership changes to Player even when i setted it on Server

Hello,

I found a prety serious problem, i made an Npc to move around the map and changed every NetworkOwner of all parts inside the Npc to the Server (nil),

But it seems for some reason when the player Gets close to the Npc its movement is laggy while if the player is far from the Npc the Movement is Perfect!

When the Npc spawns i set the NetworkOwner with this Code:

for _, v in pairs(npcCharacter:GetDescendants()) do
	if v:IsA("BasePart") or v:IsA("MeshPart") then
		v:SetNetworkOwner(nil)
	end
end

How can i make sure the NetworkOwner is always the Server?
Any suggestions whould be greatly appreciated!!!

Are you sure the npc is lagging for this reason?

You can check if it’s actually changing the network owner by doing this:

print(part:GetNetworkOwner())
1 Like

Yes, i checked it and when the player gets close to the Npc, it says my name instead of nill

I hate to bump this topic, but I actually know why this is happening.

I had a similar issue to this, and I searched all around the corners and crevices. The reason why it’s printing your name regardless is because every frame, contact to a player automatically sets network ownership to them. Annoying, right?

The only solution I have is to do RunService.Stepped setting every BasePart in the NPC to nil.

7 Likes

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