Object won't instantiate at parents position(solved)

I’m trying to destroy part of my enemy and instantiate a damaged version of that part in its place (kind of a ragdoll effect).

I can destroy the object fine but the object I want to instantiate doesn’t appear when the original object is destroyed.

using UnityEngine;
using System.Collections;

public class DestroyClaw : MonoBehaviour
{

	public GameObject invaderExplosion;
	public GameObject brokenClaw;
	public int clawHealth = 3;


	void OnTriggerEnter (Collider other) 
	{	
		if (other.tag == "Shot")
		{
			Debug.Log ("Hit Registered");
			clawHealth -= 1;
			Destroy(other.gameObject);
		}
	}


	void Update()
	{
		if(clawHealth <= 0)
		{
			Instantiate(invaderExplosion, transform.position, transform.rotation);

			GameObject item = GameObject.Instantiate(brokenClaw, transform.position, transform.rotation)as GameObject;
			item.transform.parent = gameObject.transform;

			MiniBossHealth.clawsAttached -= 1;
			Destroy(transform.parent.gameObject);
		}
	}
}

I’m getting the Debug logs, the clawHealth is counting down on each hit, even the explosion instantiates but the replacement part doesn’t appear?

Any ideas as to why

???

This should do the trick.

Instantiate(invaderExplosion, transform.position, transform.rotation);
GameObject item = GameObject.Instantiate(brokenClaw, transform.position, transform.rotation)as GameObject;
item.transform.parent = gameObject.transform.parent;
MiniBossHealth.clawsAttached -= 1;
Destroy(gameObject);

change

item.transform.parent = gameobject.transform

to

item.transform.parent = gameobject.transform.parent

the way it is now, you’re making the new claw a child of the current object and then you destroy the current object (so the new claw is destroyed too).