Cube instanceation at specific sides.

using UnityEngine;
using System.Collections;

public class ConstructionSpacestation : MonoBehaviour
{
    public GameObject Builder;

    // placeholder for what you see on the screen.

    private Transform actualBlock;


    void Update()
    {
        if (Input.GetMouseButtonDown(0))
        {
            Ray ray = Camera.main.ScreenPointToRay(Input.mousePosition);
            RaycastHit hit;

            if (Physics.Raycast(ray, out hit, 2000))
            {
                float dot = Vector3.Dot(transform.up, hit.normal);
                if (dot > 1)
                {
                    Debug.Log("yes");
                }

                // it's better to find the center of the face like this:
                Vector3 position = hit.transform.position + hit.normal * 0.5f;
                // calculate the rotation to create the object aligned with the face normal:
                Quaternion rotation = Quaternion.FromToRotation(Vector3.up, hit.normal);
                // create the object at the face center, and perpendicular to it:
                GameObject Placement = Instantiate(Builder, position, rotation) as GameObject;
                Debug.Log(hit.collider.gameObject.name);
            }
            else
            {
                Debug.Log(hit.collider.gameObject.name);
            }
        }
    }
}

I am trying to make this script that instantiates a cube on another cube ‘minecraft style’ make it so I cant instantiate on specific sides. If you could explain how vector3.dot(Transform.up) works I might understand it, as it is there is not a lot of documentation on it.

Thanks in advance.

Vector3.Dot(v1, v2) do exactly that thing:

(v1.x * v2.x) + (v1.y * v2.y) + (v1.z * v2.z)

or:

v1.magnitude * v2.magnitude * Mathf.Cos(Vector3.Angle(v1, v2));

So its basically multiplies vector lengths and cosinus of angle between those two vectors.

Still im not sure what code you provided should do.