destroy object

hi, i´m begginer, i have a question:

this is my script, the shield not destroyed after 5 seconds, why?

var shieldforce : GameObject;

function Update() {
    if(Input.GetKeyUp("e"))
        Instantiate(shieldforce, transform.position, transform.rotation);
Destroy(shieldforce, 5);
}

You are nearly there but you are deleting the prefab not the thing you created!

var shieldforce : GameObject;

    function Update() {
        if(Input.GetKeyUp("e")) {
            var newShield : GameObject = Instantiate(shieldforce, transform.position, transform.rotation);
            Destroy(newShield, 5);
            
     }
    
    }

Thank you !!!