SetNetworkOwnership odd struggles

Hello,
I am trying to change the network ownership of a rig/dummy/npc so that when it is ragdolled and a force is applied, it runs smoothly. What happens is the dummy starts off smooth, but when it reaches a certain distance away from the player, its ownership is switched from client to server, creating a small lag, and continuing to move away, but laggier. Both the ragdoll and the velocity is applied from a serverscript, and I have tried setting the network ownership of the torso and humanoid root part separately through SetNetworkOwner(plr). The issue is that roblox states that SetNetworkOwner is not a valid member of the dummy part as seen here:

15:00:11.418 SetNetworkOwnership is not a valid member of Part “Workspace.Rig.Torso” - Server - BasicPunchServer:47

The rig is not anchored, so I am struggling to figure out why this is happening and how to remedy.
Any help is greatly appreciated.

You’re trying to index SetNetworkOwnership with a dot instead of using a colon. This function is a method and not a property or child of a part

There is no thing called “SetNetworkOwnership” its only called SetNetworkOwner, also like @hashyyyyeryjrjej said, use a colon

1 Like

I was able to fix this and stop having the error, but the problem still persists where the server takes ownership after a certain distance.


Here is my code /\

Your best solution: Don’t do ragdolls on the server. Use remotes to communicate that all players should see a ragdoll, and the client creates it, ensuring a) a good, smooth ragdoll, b) less of a load on the server, and c) no network ownership problems.

1 Like

I was thinking about this, but wouldn’t this lead to ragdolls not being uniform? Also would I also apply velocity on the client or keep it on the server?

I am using this system:

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