Object Deletion

Ok so I have this game where I can place objects but when I don’t have a object to place in hand I want to be able to delete them with a key. So I tried but doesn’t respond… any ideas? Look at the if(objectplace == false) part…

using UnityEngine;
using System.Collections;

public class Placement : MonoBehaviour
{
	public bool objectplace = false, newobjectselected = false;
	public GameObject block;
	private int permanentLayer = 20;
	private GameObject nextToPlace;
	
	void Update ()
	{
		if(objectplace == true)
		{
			Ray ray = Camera.main.ScreenPointToRay(Input.mousePosition);
        	RaycastHit hit;

			if (Physics.Raycast(ray, out hit, 14, 1 << permanentLayer))
			{
  				float snap = 0.25f;
				Vector3 snapped = new Vector3(Mathf.RoundToInt(hit.point.x/snap)*snap, Mathf.RoundToInt(hit.point.y/snap)*snap, Mathf.RoundToInt(hit.point.z/snap)*snap);
				nextToPlace.transform.position = snapped;
				if(Input.GetKeyDown("right"))
				{
					nextToPlace.transform.Rotate(0,90,0);
				}
				if(Input.GetKeyDown("left"))
				{
					nextToPlace.transform.Rotate(0,-90,0);
				}
  				nextToPlace.SetActive(true);
  				if (Input.GetButtonDown("Fire1"))
  				{
    				nextToPlace.layer = permanentLayer; // place it, so we can put things on top
    				// get a new one:
    				nextToPlace = Instantiate(block, Vector3.zero, Quaternion.identity) as GameObject;
    				nextToPlace.SetActive(false);
    				objectplace = false;
  				}
			}
			else
			{
  				nextToPlace.SetActive(false);
			}
		}
		if(objectplace == false)
		{
			if (Input.GetButtonDown("Fire1"))
  			{
    			Ray ray = Camera.main.ScreenPointToRay(Input.mousePosition);
        		RaycastHit hit;

				if (Physics.Raycast(ray, out hit, 14) && hit.transform.CompareTag("[Item]"))
				{
					if(Input.GetKeyDown("g"))
					{
						Destroy(hit.transform);
					}
				}
  			}
		}
	}

	void LateUpdate()
	{
		if(newobjectselected == true)
		{
			Destroy(nextToPlace);
			nextToPlace = Instantiate(block, Vector3.zero, Quaternion.identity) as GameObject;
			nextToPlace.SetActive(false);
			newobjectselected = false;
		}
	}
}

This is your issue unless the ray cast isn’t working… For sure just tested it and also I think there is another error unless you did not look at the output because the output says distinctly that you “deleting the ray-casts hit transform is not aloud destroy the gameobject instead!!” I am sorry if I couldnt fix everything but that is one of the errors.
Destroy(hit.transform);
To:
Destroy(hit.transform.gameobject);

I decided to abandon this and start fresh thanks all.