Stop Network Ownership being automatically set

Working on a football system, and can’t really find a solution for this issue.

My system works like this:

Ball gets attached to the player using a Motor6D and parented to the players character

When I unattach it and parent it outside, the network ownership automatically changes no matter. If i change it back immediately, well then it causes some tp-ing because of the network ownership changes. Setting the network owner to nil at the start does not fix this.

Yeah this is really annoying, I’ve dealt with this before in a similar system. What worked for me was keeping the ball parented to workspace the whole time instead of reparenting it. So instead of moving it in/out of the character, I just weld it to the character while it stays in workspace. That way the ownership doesn’t flip back and forth.

Also make sure you’re setting the network owner BEFORE you unparent it from the character, not after. So like:

  1. Set network owner to the player who’s gonna receive it (or nil if you want server)
  2. Destroy the Motor6D
  3. Then do whatever positioning you need

If you’re still getting teleporting, you might need to add a small task.wait() between changing ownership and destroying the weld.

I tried it without parenting and even then it switches network ownership, presumably because of the Motor6D part0 changing from the rootpart to nil.

I also do need to parent it aswell, because my ball is animated and the animations can only work with the ball parented under the character.

What if you kept the Motor6D connected the whole time but just set C0/C1 to move the ball away from the player? Like instead of destroying the Motor6D when you want to release the ball, just animate it far enough away that it looks disconnected. Then you can keep ownership with the original player or set it to whoever needs it without the parenting issues.

Or another thing, have you tried using a WeldConstraint instead of Motor6D? You’d lose the motor part but if you’re already animating the ball maybe you don’t need it?

A weld yields the same result unfortunately, and setting C0/C1 would not work for my use case, I need proper physics. Don’t think there is a solution for this, until roblox grants us more authority in the network ownership sector (I do believe they plan on doing this)

Might be worth making a feature request about that if there isn’t one already.

In the meantime the only other thing I can think of is maybe having two separate ball instances? Like one parented to the character for the animations, and then swap to a physics-enabled one in workspace when you need to kick/pass it. Obviously not ideal and probably adds complexity you don’t want but it’d at least avoid the ownership ping pong.

You need to re-set the networkownership of the entire character the second you add or remove anything from it. If you do this in the same step that you destroy the weld you should be fine.