Trouble with ragdolls

Ok, I am making an NPC health script, and I want the NPC to turn into a ragdoll when the health = 0. I disabled the “hips” on the character to stop him ragdolling as soon as the game starts. In the script I put that when the health = 0, the hips activate, and that works fine. But I am having a problem with the next part: The Animator component is trying to delete rigidbodies, and so I had to disable the script to give the Animator priority. I added in another section in the code - in a custom function because Update and Start are killed when the script is disabled - that when the health = 0 tells the animator to deactivate, and the script to reactivate. But when the NPC takes 10 damage (so he is on 90/100) the animator stops and the script activates then. Which is too early. Here is the script(sorry, it’s a bit messy)

using UnityEngine;
using System.Collections;

public class NPCHealth : MonoBehaviour {
	public int maxHealth = 100;
	public int curHealth = 100;
	public GameObject myObject;

	
public void Start()
	{
		
	}

	
public void AdjustCurrentHealth(int adj)
	{curHealth += adj;
		
		CharacterController cc = GetComponent(typeof(CharacterController)) as CharacterController;
		Animator aa = GetComponent(typeof(Animator)) as Animator;
		
		
		if(curHealth < 0)
			curHealth = 0;
		
		if(curHealth > maxHealth)
			curHealth = maxHealth;
		
		if(maxHealth < 1)
			maxHealth = 1;
		
		if(curHealth > 0)
			GetComponent<NPCHealth>().enabled = false;
		
		if(curHealth == 0)
			myObject.SetActive(true);
			cc.enabled = false;
			aa.enabled = false;
			GetComponent<NPCHealth>().enabled = true;
		
		 if(curHealth > 0)
			myObject.SetActive(false);
		

			
		
		
	}
	public void Update()
	{

		
		
	}
	
}

Only the first instruction after the if is executed when the condition is true. If you want to execute several instructions, they must be enclosed inside curly brackets to make them a “compound statement”. This affects exactly the curHealth == 0 condition, which should be written like below:

   if(curHealth == 0){
     myObject.SetActive(true);
     cc.enabled = false;
     aa.enabled = false;
     GetComponent<NPCHealth>().enabled = true;
   }

NOTE: I’m supposing that the four instructions must be executed when curHealth == 0.