Take a look at the code snippet I posted on the BreakJointsOnDeath release annoucement. It gives you a very simple example of a ragdoll script.