How do I make a ragdoll?

I’m kind of afraid to ask this because someone might close the topic due to reasons, but
I’ve looked for answers and I got directed to scripts made by other people. Making ragdolls also isn’t very clear to me.

How would I make a death ragdoll on my own, and with the new Humanoid property BreakJointsOnDeath set to False?

18 Likes

On a server script, make it create a folder and parent it to the player’s character. In the folder you need to create preferably a ball socket constraint for all the joints of the character. The character already has premade attachments (LeftHipRigAttachment, RightHipRigAttachment etc). Once all the ball sockets have been created you might wanna adjust the limits of the constraint for a more realistic ragdoll. When the player dies, the character should be a ragdoll, however the accessories will fall out of the world :confused:

Edit: I just read the Break Joints set to false, this wouldn’t work then

2 Likes

Create a script in starter character that listens for the Humanoid.Died event. Do what I said in my first reply to create ball sockets. When the player dies, iterate through the character to destroy all motor6ds.

4 Likes

Take a look at the code snippet I posted on the BreakJointsOnDeath release annoucement. It gives you a very simple example of a ragdoll script.

52 Likes

This is awesome! That’s definitely the kind of optimisation we need :slight_smile:

Is this for R6 or R15?

R15. I don’t know if it will work for R6, however it may.

2 Likes

It doesn’t seem to work for R6, unfortunately.

1 Like

To make a ragdoll you could do this in multiple ways.

When the humanoid dies you could store all Motor6D Part0, Part1, C0 and C1 in a table (useful for if you use big R6 too).
Do Humanoid:SetStateEnabled(Enum.HumanoidStateType.Dead, false) to disable the dead state, this prevents joints from breaking.
For the best results I would use Attachments and BallSocketConstraints but Rotate joints sometimes also work depending on the Motor6D’s C0 rotation, etc.

You could also store a copy of the model/rig in Replicated-/ServerStorage with the joints already set up and clone & position it when the player/npc dies (don’t forget to clone shirts and pants into the model).

Hope that helps.

Edit: Store Motor6D data in a table BEFORE the humanoid dies, all joints get destroyed after the humanoid dies.

2 Likes

@RubyEpicFox

A new Roblox update shook up the meta for ragdoll scripts, I think.
https://devforum.roblox.com/t/humanoid-breakjointsondeath/252053/

7 Likes

Hey. I am 4 years late but do you know how can I disable ragdoll without killing the player?