How should I handle the networking of my ragdolls?

It is more of a quick question - I want my script to read when the ragdoll will happen. This being said it gets the apex of the moments after being on the air and compares it with a threshold.
To make a ragdoll, I need the server to make the limbs flailing and the client to change the HumanoidState.
How should I handle it?

a) The server be the only one to read it and send a remote to the client to change the state;
b) Both the client and the server read at the same time and execute their functions accordingly;
c) The client be the one to decide it all.

If you have other options, please let me know as well!

I’m gonna go with client handle it all cus if you’re worried about exploiters, they can easily override whatever you’re doing anyway

Including the arms being loose?

I need the server to detect it anyways as I need to deal damage.

Oh right, ull need the server to change the constraints if that’s how you’re doing your ragdoll

1 Like

Yeah, but I could have the server detect it as well or just send a remote over.

Well, since you’re doing things that need to be done on server and client, then go with handling everything on server and firing the event whenever the thing happens so that the client can change their humanoid state. Server will change constraints and whatever else you’re doing (dealing damage)

1 Like

Alright, but just to confirm can exploiters change the constraints back?

If you make it so the server owns the ragdoll, then any physics changes done locally will remain local only.

I would rather give the server NetworkOwnership to be honest. At the moment, I have been mostly trying to replace the characters, which looks bumpy in practice, especially in a situation in which the character is moving. Are you aware as to how I could change the network ownership of the entire character? The function :SetNetworkOwner() applies to base parts, thus my confusion.


I just tried out changing the ownership to the server through a function that iterates through all descendants. Upon changing, there is a slight lag, the player gets stuck mid-air for half a second.

You only need to give network ownership of the base part to the rig/assembly, in this case, it should be their HumanoidRootPart.

Is the player still controlling their character when you do this?

Their HumanoidState should be Flying at that point, meaning they cant move but they have control. If they land with a low fall distance they should be able to walk fine.

I tried different combinations of what parts to set the ownership to the server as however the result is always the same - a bump.

If that’s the case I would just leave the client as the network owner so there isn’t a physics delay. Also assuming the player will regain control once they land.

On a last note, to change the humanoid’s state, I need to send a remote, correct? I have tried to change the state on the server with little success…

The state of the humanoid should be changed locally, I believe, as the player is controlled client-sided.

Alright, thank you very much for the help and I apologise for any inconvenience I might have caused!

1 Like