What I have currently is a custom rig with BallSocketConstraints already preconnected and preenabled, and right now all the server does is break character Motor6D’s on death. But, the ragdoll is laggy (20hz) if the server has NetworkOwnership, and whenever I set network ownership to the player that died, they start spazzing out. All I’m doing right now is setting the state of the humanoid to dead and disabling the GettingUp state (PlatformStand also spazzes out the ragdoll for some reason), but the results are not very good, especially when kill effects come in, because of BodyMovers. How I handle kill effects is that when a player dies, the server tells the clients within a radius to execute that kill effect the killer of the player has equipped. The network ownership of the player who died is also set to the killer (not sure if this even did anything to help now?). I run all kill effect code client side (one giant module, yes I’m aware of security risks but it’s not really that beneficial if someone uses that code, and I don’t need a bunch of kill effects lagging the server. Also if someone decided to change their kill effect, no one else would be able to see it because the server didn’t tell anyone to). But, all of them use BodyMovers, and the physics for the ragdoll aren’t smooth on any of the clients (even the killer). The ragdoll looks like it struggles to find a network owner or something.
I’m assuming this is because of a weird distribution of physics:
Server:
Owns the constraints, and the constraints are always enabled, so I’m assuming when Motors are broken on the server the server is still calculating the physics for the constraints
Applies a bodyvelocity to ragdoll if there is no killer so that it still falls over (If a player resets)
If a player is killed by another player, tells clients to run any equipped kill effect (and all of the BodyMovers and effects are created locally), and sets NetworkOwnership to the killer
Client:
Executes any kill effects if told to (EVERYTHING is created locally) (So maybe the server owned constraints are clashing with client BodyMovers?)
Disables/ enables humanoid states (Enables Dead, disables GettingUp, doesn’t PlatformStand)
So,
how would I make a seamless ragdoll that is smooth on all of the clients, and doesn’t spaz out (like Arsenal)? If you’ve played Arsenal, the kill effect ragdolls are smooth on everyone’s screen, and I’m pretty sure they run kill effects/ragdolls locally as well. The only thing I’ve thought of so far is to have the preconnected constraints disabled, and then when a player dies the server tells clients in a radius to ragdoll said player (apply BodyMovers and enable the constraints client side. Would this make it so that the physics of each client’s local ragdoll for that player are calculated by that client?)