Place cubes? problem with my script :S

Hey guys! :slight_smile:
Im still making on my minecraft likely game. Im trying to make a system to i can place cubes. Like this video shows: Unity3D - Minecraft-style game - YouTube

I just cant figure out how to make a script witch is placing these blocks right :S

at the moment i got this

var Cube : Transform;

function OnMouseOver() {

renderer.material.color = Color.gray;

if (Input.GetButtonDown("Fire1")) {


Instantiate(Cube, GameObject.Find ("spawn6").transform.position, transform.rotation);

}

}

I made my blocks in 6 parts 1 cube on each side. all these cubes got this script. I made a little spawn cube where they could spawn but its not going great :S. hope you can help me :slight_smile:

I don’t know if this will help you but this a basic instantiating script

var newObject : Transform;

function Update () { 
	if (Input.GetButtonDown("Fire1")) {
		Instantiate(newObject, transform.position, transform.rotation);
	}
}