Gun accuracy with Random.Range?

I am trying to make guns accurate by adding in a "Random.Range" referenced added to the "Vector3" direction my player is facing. Yet, I am unsure of how to do this.

function Fire() {
   if (Time.time > reloadTime + lastShot && clipsize > 0)

      if (abletoshoot == 1) 
         BroadcastMessage ("ShootAnimation");

         var instantiatedProjectile : Rigidbody = Instantiate (projectile, transform.position, transform.rotation);

         instantiatedProjectile.velocity = transform.TransformDirection(Vector3(0, 0, initialSpeed));

         Physics.IgnoreCollision( instantiatedProjectile.collider, transform.root.collider);

         lastShot = Time.time;

Im not sure where to put in "Random.Range", and how to set the range etc., while still keeping the same parameters. Is anyone willing to show me how I could perform this?

You will want to put `Random.Range()` in your code where you specify the direction to shoot the projectile.

 // Randomize the x and y direction of the projectile
 instantiatedProjectile.velocity = transform.TransformDirection(Vector3(Random.Range(min, max), Random.Range(min, max), initialSpeed));

Replace `min` and `max` with the actual values for the minimum and maximum values of the random direction.