We are running into an issue where a vehicle switches network ownership from client to the server even though there is a player still controlling the vehicle.
This issue started happening since a couple days ago, we didn’t touch anything with our vehicle system when it started happening.
This specifically happens when players switch from the flying mode to “Taxi” mode which allows them to drive the vehicle, I attached the code that handles this in the private message.
Network ownership should get set to the server when specified in the code or if the person is not touching/sitting in the vehicle like how it was before.
We are experiencing a similar bug but except it’s the exact opposite. Objects that should be owned by the server are attempting to get force-set to a client, causing everything to glitch out.
There is nothing in our code reverting the network owners for these instances, they are set to nil on creation and should remain nil. Our game never had this issue until just around when this was reported, as in it only started occurring within the past month. You can see in the video what happens when the game tries to assign ownership to a client, it causes the vehicle to glitch out into NAN-space briefly. This video was taken from perspective of the client. If viewed from perspective of the server, the vehicle continues to move forward without any issue.
The console is printing out the network owner every Stepped.
Even if we try resetting the owner to nil every Stepped, it still breaks through and forces the assignment to a player briefly.
Hey guys! Sorry, I had replied to the post in DM’s, but forgot to reply publicly.
Without getting into too many details (in order to protect KizmoTek’s script), when the Server simulates an automatically-Client-owned Part (i.e. via a ServerScript setting Velocity), it’ll shift NetworkOwnership back to the Server automatically. This needs to work this way (at least, at the moment) because we’ll enter bad state if we allow multiple peers to authoritatively simulate the same part.
The way to tackle this problem is to do exactly what KizmoTek said they did: manually assign network ownership to the Client if you don’t want the Server to take ownership back when simulating the Client-owned part. Manually assigning NetworkOwnership of an object being welded to the avatar will manually assign ownership of the entire “Physics Object” to the Client, solving this issue.
That’s not good - if you manually set the network owner to nil, that shouldn’t change. This sounds like it is an Engine problem. Would it be possible for you to PM me a repro file? It would really help speed up our investigation.
We were also experiencing this issue in Drive World, but don’t seem to be seeing it anymore. It was 100% not our code resetting ownership to the server though.
We’ve made several changes ourselves, so it’s possible we are somehow bruteforcing a fix - but if someone fixed it internally that would also explain why we aren’t seeing it!