Removing BallSocketConstraints to disable ragdoll without killing the character

Hello. I saw a ragdoll script here and wanted to test it out: Humanoid.BreakJointsOnDeath - #13 by Fm_Trick
It works, however it is scripted in a way that character gets ragdoll when it dies.

What I want to achieve is to enable ragdoll when a projectile hits the character and turn it off 1 second later. When I remove the BallSocketConstraints the character dies. When I set their attachments to nil and make their parent nil the character dies again. How can I solve this?

1 Like

Turn off Humanoid.RequiresNeck.

Create your ball socket constraints right away, but once they’re created, set their Enabled property to false.

When you want to ragdoll, instead of entirely destroying your Motor6Ds, just set their enabled properties to false, set your ball socket constraints’ Enabled properties to true.

When you want to un-ragdoll, just do the opposite; set your Motor6D Enabled properties to true, and set your ball socket constraint enabled properties to false.

2 Likes

Thank you, this worked. I mean even after this I am having a problem where the character flies in the air while ragdoll is on but that wasn’t my question so I am marking this as the solution.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.