Wait five seconds

I’m making a script that when my player crosses a line a turret points and shoots at me I wrote all of that but now I want it to look at me , wait five seconds then shoot at me I tried looking at unity script reference but the stuff they give you can’t be used in function Update()
here is my script:

var target : Transform;
var rotationspeed : float = 30;
var fireRate : float = 0.1;
var Prefab: Transform;
private var nextFire = 2.0;
var speed : float = 50;
function Update(){
transform.Rotate(Vector3.up * Time.deltaTime * rotationspeed);
if(target.position.z>109){
transform.LookAt(target);
//here is where I want it to wait 5 seconds
nextFire = Time.time + fireRate;
    var copy = Instantiate(Prefab,GameObject.Find("Mini Gun Spawn").transform.position,transform.rotation);
   copy.rigidbody.velocity = transform.TransformDirection(Vector3.forward * speed);
    
}
}

There’s a simple way to do that with your current script: keep setting nextFire to Time.time+5 while the target is behind the shot range - this way there will be a 5 seconds delay when the player enters the shot range, and after that the shots will obey the fireRate interval:

function Update(){
  transform.Rotate(Vector3.up * Time.deltaTime * rotationspeed);
  if(target.position.z<=109){ // while player outside shot range...
    nextFire = Time.time + 5; // set nextFire to 5 seconds from now
  } else { // but when inside range...
    transform.LookAt(target); // look to the player...
    if (Time.time >= nextFire) { // and shoot when nextFire time reached:
       nextFire = Time.time + fireRate; // set new nextFire time...
       var copy = Instantiate(Prefab,GameObject.Find("Mini Gun Spawn").transform.position,transform.rotation); // create projectile...
       copy.rigidbody.velocity = transform.TransformDirection(Vector3.forward * speed); // and shoot it
    }
  }
}

You can’t use Coroutines inside update but you can just start one using StartCoroutine from update:

  function Update() {
      if(somethingHappened) {
          StartCoroutine("ShootAtMe");
      }
  }

  function ShootAtMe() {
       yield new WaitForSeconds(5);
       //Start shooting
  }