Cannot convert 'UnityEngine.GameObject' to 'UnityEngine.Transform'

Hi. I’m working on a voxel project, and to place blocks I have this code:

#pragma strict

var DirtPrefab : Transform;
var placePointTransform : Transform;

function Start () {
    placePointTransform = GameObject.Find("PlacePoint");
}

function Update() {
    var Block : Transform = Instantiate( DirtPrefab, placePointTransform.position,

Quaternion.identity ); }

I have a prefab called Dirt, and I have an object called PlacePoint, located exactly like a crosshair in front of the player. This is the great script of alucadj, but if you can’t fix it, just sent me a minecraft project at micaelunity22@gmail.com

What is happening is that you are getting a gameobject(with GameObject.Find) and you want to are passing it as a transform.
Instead of this:

function Start () {
    placePointTransform = GameObject.Find("PlacePoint");
}

Replace it with this. \

function Start () {
    placePointTransform = GameObject.Find("PlacePoint").transform;
}