How do I make and item pop out of a chest?

I have a treasure chest that opens up when you get in front of it. I want an item to pop out of the chest and hover over it for a second and then disappear. How do I do this? I tried using instantiate but it didn’t look right.

Code so far, line 18 is where my issue is. Also if anybody can tell me how to instantiate just one and not a billion items that would be great to. This is in 2D.

using UnityEngine;
using System.Collections;

public class ActivateChest : MonoBehaviour {

	public Transform lid, lidOpen, lidClose;	// Lid, Lid open rotation, Lid close rotation
	public float openSpeed = 5F;				// Opening speed
	public bool canClose;						// Can the chest be closed
	public GameObject item;

	public bool _open;							// Is the chest opened

	void Update () {
		if( == true){
			Instantiate(item,item.transform.position = new Vector2(3,2),Quaternion.identity);


	// Rotate the lid to the requested rotation
	void ChestClicked(Quaternion toRot){
		if(lid.rotation != toRot){
			lid.rotation = Quaternion.Lerp(lid.rotation, toRot, Time.deltaTime * openSpeed);
	void OnTriggerEnter(){
		if(canClose) _open = !_open; else _open = true;


You can’t set the item position in the instantiate method.

//Wrong/BAD PANDA:
Instantiate(item,item.transform.position = new Vector2(3,2),Quaternion.identity);

//Right/Good Pandashark:
GameObject newitem = Instantiate(item,item.transform.position,Quaternion.identity) as GameObject;
newitem.transform.position = new Vector2(3, 2);