I have spent many hours on this and not sure why its not working!
public class Brick : MonoBehavior
{
public Transform Brick4;
public GameObject myobject;
void OnMouseDown()
{
myobject = Instantiate(Brick4, transform.position, transform.rotation) as GameObject;
myobject.transform.Translate(1, 1, 1); // This is where the error occurs
}
}