I’m trying to make my spaceship’s physics be controlled by the client when the server creates it.
The issue I am having is that after flying around a little bit, the ownership goes back to the server and the entire ship stops moving and the client cannot control the movement of the ship. Using studio’s physics settings I was able to identify this with the “Are Owners Shown” toggle.
Screenshots are results from “Are Owners Shown”.
Green box represents client owned physics. (Good)
White box represents server owned physics. (Bad)
I’ve checked for anything that could be welding to the ship and disabling them and even setting all parts in the ship to be owned by the client but I still get the same results. No one in the Dev Forum seemed to have any relevant answers to this problem and I tried researching on the API page for Networking
Even attempting to have the server give ownership back to the client every heartbeat was unable to fix this issue and instead would create a stutter effect on the ship and eventually give ownership back to the client only to freeze again.
The ship consists of a mesh and a primary part (the engine) which are welded together by the WeldConstraint. They use a BodyVelocity and BodyGyro with MaxForce/MaxTorque of 10^10. The client gives the BodyVelocity and BodyGyro an updated Velocity/CFrame every heartbeat. The only time anything is ever welded to the ship is when a bullet hits the ship in order to display a particle effect, but these bullets are given Network Ownership to the client. This issue still occurs when no bullets are fired.
Any tips for what I should look for or something that I am missing about Networking would be greatly appreciated.