I don't understand what the error is in this Javascript ?

var thePrefab : GameObject;
function Start () {
var instance : GameObject = Instantiate(thePrefab , transform.position , transform.rotation , transform.scale);
}

In the console after I script this script(?) it returns with

Assets/Spawn.js(3,49): BCE0023: No appropriate version of ‘UnityEngine.Object.Instantiate’ for the argument list ‘(UnityEngine.GameObject, UnityEngine.Vector3, UnityEngine.Quaternion, System.Object)’ was found.

I’m not sure what thos means ? Can someone explain what the error is and how I can fix it ? All help appreciated . Thannks in advance :slight_smile:

The error means the compiler didn’t find a method that is named Instantiate and takes 4 parameters of the type (UnityEngine.GameObject, UnityEngine.Vector3, UnityEngine.Quaternion, System.Object).

To fix this, you need to read the documentation on Object.Find, see how it’s used and then use it accordingly. Hint: The error is related to the parameters.