How would I make a player ragdoll and get back up?

Hello there! I am working on a pillow fighting game. I want to make it so when a player is it, they ragdoll and it smoothly transitions to an animation of the player getting back up.

What have I tried so far?
I tried to take apart a ragdoll script that I found, but I couldn’t seem to figure out what to use and what not to use. After that didn’t work, I tried making a ragdoll-and-getting-back-up animation (I am TERRIBLE at animating). As I expected, I couldn’t really get it the way I was envisioning. It wouldn’t have really worked out anyways, as it would make you look like you’re floating in the air if you got hit off of, say, a mountaintop.

What do I mean by “smooth transition”?
I figured that if it went straight from the ragdoll to the animation, it would look very fast and unnatural. So I want it to smoothly go from the ragdoll to the animation. Perhaps using CFrame to smoothly move the limbs of the player to the position of the start of the animation would do it?

Important Notes
My game is using R6. Anything that only works in R15 won’t do it. I will try to release an animation for getting up soon.

All feedback is appreciated. Thanks!

2 Likes

Ragdolls usually use BallSocketJoint, so that’s probably your best bet combined with a ‘for do loop’ of sorts.

A temporary fix would be to set Humanoid.PlatformStand on temporarily.
Note that I’ve never really used ragdolls, so this is speculation for the most part.

3 Likes

Could you explain how I would implement this? I checked the Developer page on it, but I can’t really figure out how to put it in my game (I’m a bit new to scripting).

As far as BallSocketJoint instances go, a GetDescendants() would work with the loop; basically replace body welds with a ball socket instance. (You may have to disable RequiresNeck in Humanoids, though.)

As for the PlatformStand property, it’s as simple as setting the value ‘PlatformStand’ in a Humanoid to true then back off.

Optionally you can add a BodyForce to have characters fly around a bit during either ragdoll.

I hope this provides a solution for your query! I open sourced my working ragdoll concept.

1 Like