Can't destroy gameObject with Destroy()

The parts that aren’t working are the yield and destroy commands, everything else works perfectly without those two lines of code. How can I get the bullets to de-spawn after a given amount of time. Thanks.

#pragma strict

var bullet : GameObject;
var distance = 10.0;
function Update () {
    if (Input.GetMouseButtonDown(0)) {
        var mousePosition = Vector3(Input.mousePosition.x, Input.mousePosition.y, distance);
        mousePosition = Camera.main.ScreenToWorldPoint(mousePosition);

        var shoot = Instantiate(bullet, transform.position + new Vector3 (.7, 0, 0) , Quaternion.identity) as GameObject;
        shoot.GetComponent.<Rigidbody2D>().AddForce(shoot.transform.forward * 500);

        yield WaitForSeconds (3);

A better solution is to just deactivate the bullet using gameObject.SetActive(false). You can then reuse the bullet! This is called object pooling and is used throughout all kind of games to increase performance.

Destroy(), has a built in timer function.

Destroy(gameObject, 10f);

Just change 10f to whatever time you want. Make sure it is a float though.