How to destory only one prefabs!

Hello all,

Having a bit of touble here, Im doing a simple game of shooting gallery game. I have trouble with my prefabs.
When I click on one of my prefabs to destroy it, all the other prefab destroy as well. How to I solve this problem. I want the object that I click destroy, not all of them.

Below is my script:

using UnityEngine;
using System.Collections;

public class Puzzle01_Roach : MonoBehaviour {

    public int fHealthAmount;
    public int iDamage;
    public float fHealth;
    public float fHealthColor;
    public tk2dSprite sColor;
    public GameObject gRoach;
    public GameObject gPartical;
    bool isDead;
    float t;
    public Camera cCamera;
    Ray rRay;
    RaycastHit rRayHit;


    // Use this for initialization
    void Start ()
    {
        fHealth = fHealthAmount;
        isDead = false;
        gPartical.SetActive (false);
        gRoach.SetActive (true);
    }
   
    // Update is called once per frame
    void Update ()
    {
        rRay = cCamera.ScreenPointToRay (Input.mousePosition);
           
        if (Input.GetMouseButton (0))
        {
            if (Physics.Raycast (rRay, out rRayHit, 100))
            {
                if (rRayHit.collider.gameObject.tag == "tRoach")
                {
                    fHealth -= iDamage;
                }
            }
        }
       
        if (fHealth < 1)
        {
            gPartical.SetActive (true);
            gRoach.SetActive (false);
            isDead = true;
        }

        if (isDead)
        {
            t += Time.deltaTime;

            if (t > 1f)
            {
                Destroy (this.gameObject);
            }
        }

        fHealthColor = fHealth / 100;
        sColor.color = Color.Lerp (Color.red, Color.white, fHealthColor);
    }
}

thank you.

Destroy (gameObject) should work but you have to specified what are the gameObject you want to destroy. this.gameObject will destroy the object that attached by that script.

I think you want to destroy gRoach gameObject as I can see you are disabling it just at the time of death. In that case use below.

 Destroy (gRoach);

But you can organise the way you want to do much better.

Manage to solve the problem… I just change the

if (rRayHit.collider.gameObject.tag == "tRoach")

to

if (rRayHit.collider.gameObject == gameobject)

this will only destroy the only game object that I am interacting with.