Humanoid Ragdolls using the new IKControl feature!

I had an idea, and I set it up very quickly! Since the IKControl feature is out and you can use it to position arms on live humanoids, you can fairly easily set up a ragdoll on a player while they are still alive. This could be used for being temporarily knocked down.

The way I achieved it is by essentially creating a marionette:

  1. Create 4 new target parts (one for each limb, you could go further and do the head also)

  2. Attach these parts using a Rope Constraint to the appropriate shoulder/hip attachment. *I suggest a rope length between 2.75 and 4


    Note these target parts collide with the player, if you want to reduce the size further then consider using NoCollisionConstrants or Collision Groups.

  3. In the humanoid (make sure there is an Animator), create the respective IKControl items. For the hand IKControls, set the EndAffector to the hand and the ChainRoot to the shoulder. For the legs, the End is the foot and the Root is the upper leg.
    image image
    Type = Position is the best setting for this.

  4. Set the humanoid’s state to Enum.HumanoidStateType.Physics

Result:


Tugging the character around:

Ragdolled while playing /e dance (the arm dance!)

Pros of this method

  • Much easier setup than having to create individual ball joint sockets
  • Joints don’t have to be altered on the character / a ragdoll asset doesn’t have to be duplicated to replace the character
  • Can be layered with existing animations
  • Smoothness/weight can be adjusted for the IK to change the behaviour of the ragdoll

Cons of the method

  • Subject to being flung due to physics goofyness (although it seems fairly stable in my brief tests)
  • Will have to work around FilteringEnabled to replicate effect
    • Method 1: Trigger an event on the server which creates the target parts/ropes and then sets the network owner to the ragdolled player.
    • Method 2: Create the parts on the client & send the position updates of those parts to an event which replicates the offset/part positions with hidden duplicate parts for other clients to utilise.
28 Likes

Holy crap, i might finally be able to make players in my games ragdoll when dying, I wasn’t able to figure it out on my own. Thanks!

3 Likes

When players die they have their joints broken and fall apart (currently that crashes the game with IKControls active) - I think you can disable their joints being broken on death in the humanoid!

1 Like

Yeah, you can disable joint breaking. That’s why in some games the player goes stiff upon death. I do hope the crash gets fixed tho. Honestly, I might use that in the future bc ragdolls can be good now.

how can you do it in R6? you only showed it for R15

Unfortunately, it doesn’t seem supported for now

Nevermind, reading the thread it seems possible, just not the exact same setup.

:confused: but Flee the Mall only have R6 NPCs and I can’t use it in that game?

this is the current progress, and the game uses Future Lighting to have realistic graphics

2 Likes

It should be possible, just set the IKControls for the arms and legs differently!

For the arms, chainRoot and EndAffector should both be set to the arm. Vice versa for the legs.

Other than that, I believe nothing else has to be changed. Maybe set the control type to Rotation?

1 Like

ok so the endeffector and chainreaction is the arms/legs, so what about the target?

The target will be the same, the ‘target part’ with the rope attached to the torso :slight_smile:

2 Likes

Since people are interested, I’ve created a demo place file with scripts for both R15 + R6!

image

LiveHumanoidRagdoll.rbxl (77.0 KB)

9 Likes

Just a heads up, the R6 ragdoll does not work.