How would I make a client sided ragdoll?

Hello, I am using this ragdoll system:

This basically puts a script inside a player or npc’s character model which replaces the joints with ball joints. This makes the ragdoll run on the server, and I am wondering how I would make it run on the client solely. I know that I would have to fire all clients, and make them run this script, but locally each time something is ragdolled. What I don’t know is how to truly go about this, like where I should put the script, and how I should use it with remote events.

2 Likes

I’m gonna bump this because I have the same problem.

Hey bud I resolved this. In my solution I only need ragdolls on death, so it worked for me. I just had all the ragdoll logic on the client, so the server fires all clients to ragdoll effect of a certain rig or player on every client. I did this by making a clone on the client, sending a remote to the server after it is successfully cloned, deleting the rig on the server, and finally doing the ragdoll logic on it. Hope this helps. Let me know if you need more details.

Ok I will try that, should I weld the clone to the actual character?

My code literally turns the rig into a husk, no humanoid, animator, or anything but limbs. Just replace all joints and leave it.

I also create collider parts as per the open source script, you can just weld to limbs like normal and make limbs cant collide. I also dont make collider parts for the head and torso.

i tried your solution and it worked perfectly! thanks man

I have had good success (r15 but r6 should work the same) using a script that simply adds hinge and ball socket constraints to the players character on added.

I had to tweak the values very precisely, and also manually delete the motor6D instances on death instead of BreakJointsOnDeath. It’s not robust but it should be good enough for a decent looking ragdoll.

I’m unsure if physics for these constraints are still calculated when the motor6D override them, but if you are worried about the lag that is as simple as disabling them by default and only enabling them when the ragdoll is needed.

i can send you my script if you would like to see it, i made it for r15 and not r6 though

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.