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:
Create 4 new target parts (one for each limb, you could go further and do the head also)
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.
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.
Type = Position is the best setting for this.
Set the humanoid’s state to Enum.HumanoidStateType.Physics
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.