Gun Doesn't Shoot Where It's Pointed

Hello, I am making a first person shooter and I’m making a firing gun. However, with all the scripts I try the gun constantly fires in only one direction, on the right side of the x axis. Heres the script I’m using now:

var shootForce : float;
var bulletPrefab : Transform;
var myMuzzle : Transform;

function Update ()
{
	if(Input.GetButtonDown("Fire1"))
	{
		var bullet = Instantiate(bulletPrefab, myMuzzle.transform.position, Quaternion.identity);
		 bullet.rigidbody.AddForce(transform.forward * shootForce, ForceMode.Impulse);
	}
}

Just for extra information, the muzzle is an empty game object which is a child of the gun, it’s what spawns the bullets. Could someone help me out. Thank you

I had issues like this once. First click on your gun in project view so the arrows pop up. Because you’re using transform.forward, make sure the z-axis arrow is pointing in the direction the arrows will shoot. If it is shooting arrows in the same global direction no matter where you shoot, that means that there is a problem with your definition of forward. I hope this is helpful (even just a little).