Destroy instantiated Projectile after time

I’m writing a C# script to shoot. i also want to destroy the instanted Projectile after a time of 2 seconds but it does not work. here is my script:

using UnityEngine;
using System.Collections;

public class shoot : MonoBehaviour
    public Rigidbody myShot;
    private float speed = 20;

    void Update()
        if (Input.GetButtonDown("Fire1"))
            Rigidbody instantiatedProjectile = Instantiate(myShot, transform.position, transform.rotation) as Rigidbody;
            instantiatedProjectile.velocity = transform.TransformDirection(new Vector3(0, 0, speed)); 
            Object.Destroy(instantiatedProjectile, 2.0f); // should destroy instantiated Projectile after 2s

can anyone halp me?

Put this script on the prefab that is being instantiated

function Start () {
	yield WaitForSeconds(2); //Wait two seconds
	Destroy(gameObject); // destroy gameObject that script is attached to