How would I rig a custom animal rig to have a ragdoll

I created a custom animal rig for a game I am making, and was trying to figure out how to give it a ragdoll upon death. I know how ragdolls work on player rigs, but for some reason when I do the same thing on this model, the ball socket constraints freak out and the limb goes flying around with the whole body in the air. Is there a way to do this that doesn’t do that? Any help would be welcome.

image

image