The script below is a script for shooting in a 2d top down game, I’ve tested the shooting/raycast and they work. I just don’t know how to destroy the object that is shot.

using UnityEngine;
using System.Collections;

public class Weapon : MonoBehaviour {

	public float fireRate = 0;
	public LayerMask whatToHit;
	public float Range = 0;
	public EnemyHealth _EnemyHealth;
	public GameObject Body;



	float timeToFire = 0;
	Transform firePoint;

	
	// Use this for initialization
	void Awake () {
		firePoint = transform.FindChild ("firePoint");

	}
	
	// Update is called once per frame
	void Update () {
		if (fireRate == 0) {
			if(Input.GetKey(KeyCode.Space)){
				Shoot ();
			}
		
		}
		}
	void Shoot () {
		Vector2 firePointPosition = new Vector2 (firePoint.position.x, firePoint.position.y); 
		RaycastHit2D hit = Physics2D.Raycast (firePointPosition, Vector2.up, Range, whatToHit);
		if (hit.collider != null) {
			Destroy(hit.collider);
		}
	}
}

Destroy(hit.collider);

This will only destroy the Collider you hit with your Raycast.

If you want to destroy the GameObject that the Collider is attached to, try this:

Destroy(hit.collider.gameObject);