Network Ownership Automatically Reverts?

I have a walking NPC. I manually set its Root Part’s network owner to the server, in order to avoid stuttering. However, when I get too close, it stutters. I am using a printout to see the network owner, and it appears that when I got close, it made me the network owner (when I get far it reverts).

My code is (on the server):
root:SetNetworkOwner(nil)

2 Likes

root:SetNetworkOwner()

Try this.

1 Like

Network ownership will always go to the nearest player when set to nil. It will only stay somewhere specifically when you set it to a player. I believe that the only way to solve this is to set it to nil over .Stepped (which I believe runs before physics calculations, may have to double check that).

1 Like

Ok I don’t know why, but I moved the line of code to later in the script and now it works.

I think this is because I added a tool to the NPC after setting network ownership, which caused it to revert to automatic?

4 Likes