Gun script is shooting wrong direction,Script is shooting wrong direction

Hi, i have problem with script. When i type transform.forward the bullet only drops from the gun and if i type transform.right it shoots backward
Here is the script

var Bullet : Transform;
var Spawn : Transform;
 
 
function Update ()
{
    if(Input.GetButtonDown("Fire1"))
    {
       Shoot();
    }
}
 
function Shoot()
{
    var pel = Instantiate(Bullet, Spawn.position, Spawn.rotation);
    pel.GetComponent.<Rigidbody>().AddForce(transform.right * 2000);
 
}

Here is my code. It’s c# but I think you can use it as a referecence:

Rigidbody2D clone;
clone = Instantiate(Projectile, transform.position, transform.rotation) as Rigidbody2D;
clone.velocity = transform.TransformDirection (Vector2.up * ProjectileSpeed);