Spawning off size blocks

I have the following scrip allowing me to spawn blocks in my scene when I do it on a standard size cube they stack just fine but if I go to any size other size then that they tend to not stack correctly. Most of the time they stack inside the one you are trying to spawn it on top or side of.

using UnityEngine;
using System.Collections;

public class CubeBuilder : MonoBehaviour 
{

	float range = Mathf.Infinity;
	public GameObject currentBlock;
	public Transform curBlock;
	RaycastHit hit;
	public GameObject piece;
	public GameObject piece1;
	private Transform child;
	Vector3 hitPoint;
	private Rect checkRect = new Rect(0,0,160,160);
	public Ray ray;
	private GameObject[] blocks;

	void Start ()
	{	
		blocks = GameObject.FindGameObjectsWithTag("WorldBlocks");
	}


	void  Build ()
	{
    	 ray= Camera.main.ScreenPointToRay (Input.mousePosition);
    	RaycastHit hit;
		
		if (Physics.Raycast (ray,out hit, 1000))
		{hitPoint = hit.transform.position + hit.normal;
			Instantiate(currentBlock, hitPoint, curBlock.rotation);
		}
	}

	void  Erase ()
	{
		ray= Camera.main.ScreenPointToRay (Input.mousePosition);
		RaycastHit hit;
		
		if(blocks.Length> 50)
		{
			if (Physics.Raycast (ray, out hit, 1000))
			{
				piece1 = hit.transform.gameObject;
				piece = piece1.GetComponent<ParticleHolder>().ruble;
				
				hitPoint = hit.transform.position + hit.normal;
				Instantiate(piece, hitPoint,curBlock.rotation);
				Destroy(hit.transform.gameObject);
                 
			}
		}
	
	}

	void  Update ()

	{
		blocks = GameObject.FindGameObjectsWithTag("WorldBlocks");
		if (!checkRect.Contains(Input.mousePosition))
		{
			if (Input.GetMouseButtonDown(0))
				Build();
			if (Input.GetMouseButtonDown(1))
				Erase();
		}
	}

}

Your problem is on line 31:

hitPoint = hit.transform.position + hit.normal;

The hit.normal has unit length (length of 1), so your hitPoint is exactly one unit away from the center of the object hit. To fix your code, you need to scale hit.normal by the size of your blocks. Assuming you’ve uniformly scaled on all three axes to to ‘scale’ size:

hitPoint = hit.transform.position + hit.normal * scale;

If the blocks are not uniformly scaled, then you are going to have to figure out what direction the hit.normal is facing and use the scale for the appropriate axis.