BCE0023: No appropriate version of 'UnityEngine.Object.Instantiate'?

Hi what I’m trying to do is make it so that when the level loads a menu appears where the player can choose a weapon to use for this round. The weapon is supposed to be instantiated at the transform of the player but I’m getting this error “BCE0023: No appropriate version of ‘UnityEngine.Object.Instantiate’ for the argument list ‘(UnityEngine.GameObject, UnityEngine.Transform, UnityEngine.Quaternion)’ was found.” for the script below.

#pragma strict

var moves = 5;
var startScreen : boolean = false;
var player : Transform;
var assaultRifle : GameObject;
var sniperRifle : GameObject;

static var turn = 1;
static var score : Number;

function Start () 
{
	startScreen = true;
}

function OnGUI()
{
	GUI.Label(Rect(10,10,150,20), "Remaining Moves: " + moves);
	GUI.Label(Rect(10,30,150,20), "Turn: " + turn);
	
	if(startScreen)
	{
		GUI.Box(Rect(30,50,500,145), "Choose a weapon /n The Assault Rifle has alot of ammo and fires quickly and is moderatly accurate 

The Sniper Rifle is very accurate but has a moderatly long reload time and has less ammo and than the assault rifle");
Time.timeScale = 0.0;

		if(GUI.Button(Rect(40,75,480,20), "Assault Rifle"))
		{
			Instantiate(assaultRifle, player.transform, player.rotation);
			startScreen = false;
			Time.timeScale = 1.0;
		}
		
		if(GUI.Button(Rect(40,105,480,20), "Sniper Rifle"))
		{
			Instantiate(sniperRifle, player.transform, player.rotation);
			startScreen = false;
			Time.timeScale = 1.0;
		}
	}

}

This is probably an easy error to fix but I’m still fairly new to scripting so any help would be appreciated.

From the documentation at Unity - Scripting API: Object.Instantiate,

you need to pass a Vector3 for the second parameter, but you’re passing in a Transform. For your code it looks like you’d want to use player.transform.position.