Instantiate not working

can anyone tell me why this code is no working?

Instantiate(NewCamPre,transform.position,transform.rotation);

I used in another project which works fine, just not in my other one. I get the following error:

Assets/Scripts/Launch.js(67,20): BCE0023: No appropriate version of ‘UnityEngine.Object.Instantiate’ for the argument list ‘(System.Type, UnityEngine.Vector3, UnityEngine.Quaternion)’ was found.

NewCamPre appears to be the name of a type and not a variable containing a prefab variable.

I had declared it earlier on in the script. It was
var NewCamePre : GameObject;

This was before the Start(){
}

Still haven’t solved it. Thanks anyway