Instantiate Help(cannot convert from 'UnityEngine.Vector3' to 'UnityEngine.Transform')

Hello all! I am making an endless runner and when I am trying to instantiate this prefab, I am getting an conversion error. Does anyone know what I would have to type to fix this? A quick explanation would help too if possible. Thanks!
Error: cannot convert from ‘UnityEngine.Vector3’ to ‘UnityEngine.Transform’

public GameObject Smallb;
public GameObject Mediumb;
public GameObject Largeb;
public GameObject copy;

void Start () {

Instantiate(Largeb, new Vector3(0f, 0f, 0f));
}

void Update () {

}
}

1 Like

Looks to me like you’re forgeting to set the rotation in the parameters, after declaring your position, you need to add the rotation.

Edit: An example would look like

Instantiate (prefab, transform.position, transform.rotation);
10 Likes

This.
If you only pass 2 arguments, the second needs to be a transform. If you are passing a vector3 for position, you need to pass the rotation as well.

6 Likes

Thanks a lot for your help guys! I appreciate the rapid responses I am getting. Its phenomenal!

Thanks guys!