How would i do ragdolling?

I’m trying to achieve a simple system that ragdolls the player once he dies.

I have already made it so the character doesn’t break, setting the property of BreakJointsOnDeath to false. However, i have little experience on building, so i don’t understand how joints, 6d motors and welds work.

Can someone assist me?

2 Likes

Do you want the script or do you want us to explain to you?

The BreakJointsOnDeath property makes this quite simple. Here’s a simple method from Fm_Trick on the announcement page:

I simply need an explanation, i don’t like copying other people’s code

I have already tried that script a long time ago, unfortunely, it doesn’t work on r6. I’ve tried everything. the only thing that happens is my character getting beheaded :confused: . poor doge.

R6 and R15 are slightly different in terms of their how they’re held together. This is why it doesn’t function correctly. Your best bet would likely be editing the one above since it has a good start. R6 is less complex than R15 and therefore shouldn’t be terribly hard to port over.

Here's R6's basic setup

And here's R15's

There are a lot more joints and things in each of the limbs, but I didn’t feel the need to show them. They’re similar to the ones in the UpperTorso.

You can use the Rig Builder Plugin in Studio to get a better view of these models and experiment a bit.

Edit: I assume there are also many other posts about ragdolling characters. You could try to look for an answer there as well.

3 Likes

I would love to, but i simply can’t grasp the concept of 6dmotors, joints, welds, etc…

I made a module on this, check it out here: [Deprecated] Tom_atoes Customisable Ragdoll

Thanks for the help, however, it seems your module handles too much things for me, and my game really doesn’t like it. Also, my game is strictly R6, and having R15 code makes everything more confusing, could you just explain me the things needed to do ragdoll, because if i understand that, i can make my own code. But thanks anyway.

It works on R6 and R15. All you have to do is fire Ragdoll:Activate(rig) and it will work. Also if I don’t get what you mean by your game doesn’t like it.

Yes, i noticed that, however, as i said, having code for something that doesn’t exist in the game is just more confusing to the other members that work at my game

But you shouldn’t need to edit the code, there is no code made for R15 other than just checking the rig for the right parts.

There’s also the problem that my game uses a respawning system that for some reason get’s overrided by your module, and that breaks the credits sequence.

I have gone ahead and marked your answer as the solution because i’m sure i can study your code to make my own ragdolling system, thanks! :slight_smile:

1 Like

In the settings module you can just set CanDespawn to false.