How do I break apart an object?

Basically I have a pixelated creature made up of these cubes and when hit by a bullet I want them to fall apart. So heres the code I wrote but for some reason it does not work.

var thePrefab : GameObject;

function OnTriggerEnter (myTrigger : Collider) {
    if (myTrigger.gameObject.name == "bullet(Clone)"){
         var count : int = 0;

        while (count <= 20){
             var instance : GameObject = Instantiate(thePrefab, transform.position, transform.rotation);
             count++;
        }

        Destroy(gameObject);
        Destroy(myTrigger.gameObject);
    }

}

You can loop through all the children in the object's hierarchy and unparent them and give them all colliders and rigidbodies.

do something like this:

for (var child : Transform in transform) {
    child.gameObject.AddComponent ("BoxCollider");
    child.gameObject.AddComponent ("RigidBody");
}

transform.DetachChildren();
Destroy(gameObject);

Is the OnTriggerEnter() method even triggered? Try putting a Debug.Log("blah") in there to be sure...

Do you have a collider on the character? Is it set as a trigger collider?

Is there a RigidBody component on the bullets or the character?

More info will help :)