[2D] bullet direction problem

so i wanna make the bullet is instatiate as same as the player direction (X axis) but when i my player facing left, the bullet is goes to the right direction.
here’s the script:

#pragma strict

var reloadSound: AudioClip;
var bulletPrefab : Transform;
var player : GameObject;
var force : float = 2000;
var shootForce : float = 1000;
var beep : AudioClip;
var totalBullet = 60;
var Bullet = 30;
var reloadTime = 2;
var reloadAmount = 10;
var MyFont : Font;
var rect_Label : Rect;
var damage:int = 1;

function Update () {   
  
    Reload ();

    if(Input.GetMouseButtonDown(0)){
        //fire bullet   
 
        fire();
        GetComponent.<AudioSource>().PlayOneShot(beep);
        //audio clip
    }
}
 
function fire(){
    if(Bullet > 0)
    
        var instanceBullet = Instantiate(bulletPrefab,transform.position, Quaternion.Euler(new Vector3(0, 0, 1)));
    instanceBullet.GetComponent.<Rigidbody2D>().AddForce(transform.right*shootForce);
    Bullet -=1;
    }

function Reload () {

    if(Bullet < 1) {    //if we have less than 1 coconut then we can reload
 
        if(Input.GetKeyDown("r")) {
 
            yield WaitForSeconds(reloadTime); //waits for "reloadTime" before adding coconuts
 
            Bullet += reloadAmount; //adds 3 coconuts to our "clip"
        }
    }
}

function OnGUI () {
   GUI.skin.font = MyFont;
   GUI.Label (rect_Label,"Ammo:" + Bullet.ToString());
    }

 
 @script RequireComponent(AudioSource)

All you have to do is to reverse shooting direction. In this line just add a minus sign:
instanceBullet.GetComponent.().AddForce( - transform.right*shootForce);

That is probably because your player prefab is rotated in Y axis around 180 degrees.

@iabulko thx man it worked perfectly fine :smiley: