Network Ownership Reset To Server When Re-Welding Model

I have a car model, with a base part that has a root priority of 127. When the car enters the workspace and is unanchored, the network ownership of the base part is set to the owning player. When the player applies some upgrades to their car (E.g. removing the tires from the vehicle, and then welding new ones on) it causes network ownership of the vehicle to reset back to automatic, going to the server when the player is far away and back to the player when they are close.

As there is only one line of code in the whole game which has a :SetNetworkOwnership statement in it, and that is triggered only when the car is spawned, it seems it is not my code which is causing the ownership to change. What is causing this to happen? Is there any other way to ensure network ownership stays with the player other than the messy method of constantly setting its ownership back to the player?

8 Likes

Out of curiosity, when you weld on the upgrades do you anchor those new additions when welding them and then unanchor them after? Based on the article Understanding Root Parts Anchored parts are almost guaranteed to take root priority. This could be causing a different part to take over (temporarily even) which might be causing NetworkOwnership to reset since the whole NetworkOwnership has a lot to do with the RootPart.

Have you tried reseting NetworkOwnership after welding on new tires? I think this would solve your problem in the most simple way. I’m not totally sure that this is the problem but it makes a lot of sense in my head :slight_smile:

I’m curious. Are you applying changed to the vehicle on the client or through a remote event on the server?

The parts are unanchored and welded onto the car by the server. Setting the owner again does work fine, but this behaviour was unexpected and possibly an engine bug?

Were you able to solve the network ownership changing?

I am running into a similar issue in my game right now. Players in my game have grappling hooks that can shoot out and attach to giant balls in order to drag them around. The network ownership of both are set to the player - the hook is set as soon as you spawn with the grappling tool, and the ball as soon as it is latched on by a hook. The hook is attached to the ball with a WeldConstraint and has a RopeConstraint to the player’s torso. Sometimes when you hook a ball the network setting will be overridden making it so that the tool, my character, and the grappling hook’s ownership are all set to the server. Sometimes it will happen within a second of grappling, other times it can take upwards of 10. Once I have the grappling hook let the ball go, the character’s physics begins to run on the client again and I can control my character properly.

(Bizarrely, it will also make my character invisible on the client (the grappling hook stays visible), but not for the server or any other players. The transparency values for all of my character’s parts are still 0, and if i change them, nothing happens. Once I let go of the ball the character remains invisible until I respawn. I have no idea how or why this happens and it makes literally zero sense to me)

Here is a demonstration (the physics switch over at 0:17):

The only solution I can think of at this point is to force SetNetworkOwner to the player every single frame… which is kind of really ugly to need to do.

I think this thread might also be related, but a definitive solution wasn’t found there either: Network ownership resetting itself

Unfortunately I never found a better solution, I just made the game set the network owner every time the car was modified. Perhaps its time for a post in platform feedback?

I still only have the Regular rank so it isn’t letting me post anything in Platform Feedback. Is there any way for me initiate an approval process for getting a bug report posted?

It actually does allow you to post in Platform Feedback – it’s just that you need to select a specific tag before you can do so (at least in my scenario). So while the default page doesn’t allow me to create a new topic, once I selected the “Engine Bug” tag after clicking on “All” at the top, the New Topic button was available.

I’m the Member rank at the moment and haven’t utilized that section frequently yet, so I’m unsure as to if the New Topic button doesn’t end up being grayed out by default at any point, or if you’re intended to select a specific tag before doing so to prevent miscategorization.

1 Like

Oh wow I didn’t notice that. Thank you!

I’m guessing that everyone probably has to pick a tag. It’s probably just some unintuitive design.

Well anyway, I think it’s time for me to start on making a repro. :o

1 Like