iTween path using self object as path0

Im trying to move an instantiated prefab using itween and I want that the first path is itself, for example, move it to another point using iTween.

I tryied many ways, my last try is I used the object as Vector3,

Take a look at my code:

public Transform[] path;

void Start()
	{

		Vector3 position1 = new Vector3(transform.position.x, transform.position.y, transform.position.z);
		path[0] = position1;
	}

void OnMouseDown ()
	{
		if(transform.gameObject.tag == "Player")
		{
			iTween.MoveTo(gameObject, iTween.Hash("path", path,"axis", "-x", "movetopath", false,  "orienttopath", true,"speed", 100));			


		}
	}
}

The error was that:

error CS0029: Cannot implicitly convert type UnityEngine.Vector3' to UnityEngine.Transform’

You can do it this way:

void Start() {
    var t = new GameObject().transform;
    t.position = transform.position;
    path[0] = t;
}

Note I’m assuming that you are creating a path in the Inspector. If the size of ‘path’ is 0 when Start() is executed, you will get an out of bounds error.

I done by myself:

Its working, thanks for the help

    public Transform fruta;
	public Transform mao;
	public Transform[] path;
	
	void Start()
	{
        fruta = gameObject.transform;
	    mao = GameObject.Find("Mao").transform;		
	    path[0] = fruta;
	    path[1] = mao;
	}