Instantiate won't work (NullReferenceObject)

Hello everyone,
I’m having trouble to use function Instantiate to clone a gameobject, because it always make the error:

“NullReferenceException: Object reference not set to an instance of an object”.

Of course I tried looking for the answer myself first, but the solutions given don’t seems to be about my problem, cause my object IS instantiate. Here is my latest code, as simple as can be (from the unity exemple, exactly the same):

var cube:Transform;
function Start(){
	Instantiate(cube, Vector3(0,0,0), Quaternion.Identity);
}


In the editor, I drag and drop a prefab of a cube with a rigidbody in the value "Cube".
I also tried a debug.log(cube?"Exists":"Or not"); before calling Instantiate, and it does say "Exists".

I really can't figure out the solution to this issue, if anyone have an idea or had the same problem, thank you for helping me :)

Damn, after 6 hours of works, I finally get it, it’s because I called Quaternion.Identity instead of Quaternion.identity…
I wasn’t looking in the right direction -.-
Still, the error message wasn’t very helpful :confused:

Not sure but i think instead of :
var cube:Transform;

You should have : GameObject cube;

I found a problem in the script. The word is supposed to be Quaternion.identity not Identity. I hope this will solve the problem