// Deletes gameobject public void Delete() { if (wordPosition.textObj) { wordManager.DeleteProjectileWord(wordPosition.textObj.GetComponentInChildren <WordDisplay>()); wordPosition.textObj.GetComponentInChildren <WordDisplay>().RemoveWord(); } // Instantiate particle effect and detaches it GameObject go = Instantiate(effectPrefab, transform); go.transform.parent = null; Destroy(gameObject); }