Wait a fraction of a second within a Function Update()

Not only do I have trouble putting a decimal into the WaitForSeconds () but as well it doesn’t want to work in a function Update cuz it says its not a corountine. Basically I’m trying to move a cube once when I press the LMB then after the fraction of a second it moves again. I get all types of problems such as the cube just moving further into space or nothing happening at all.

var time : float = 20;

function Wait(time : float)
    transform.Translate(Vector3.forward * Time.deltaTime * 1000);
    yield new WaitForSeconds(time);
    transform.Translate(Vector3.forward * Time.deltaTime * 10);


yield WaitForSeconds(time);

instead of

yield new WaitForSeconds(time);