Bullets going wrong direction

No matter what I do the bullets either go left ( When doing rigidbody.velocity(transform.forward * bulletSpeed) or right when - forward,
Up with Transform.Up
Down with -Transform.Up…
I’ve rotated the Instaniate position to almost every angle and no difference.

Good luck and please help.

function Fire()
{
    if (Time.time > fireRate)
    {
		Instantiate(gasP, gameObject.Find("GasCham2").transform.position, gameObject.Find("GasCham2").transform.rotation);
		var bulletP = Instantiate(bullet, gameObject.Find("GasCham").transform.position, gameObject.Find("GasCham").transform.rotation);
        bulletP.rigidbody.velocity = (transform.forward * bulletSpeed);
	    ammoInClip = ammoInClip - 1;
	    fireRate = Time.time;
	    lastShot = Time.time;
    }
}

Try to use the bullet’s forward direction, which is the same as the GasCham object - if needed rotate the GasCham object in the Editor to point to the correct direction. By the way, your fire rate control doesn’t work. That’s the fixed script (including bullet direction):

var fireRate:float = 5; // shots per second
private var nextShot:float = 0;

function Fire()
{
    if (Time.time >= nextShot)
    {
        Instantiate(gasP, gameObject.Find("GasCham2").transform.position, gameObject.Find("GasCham2").transform.rotation);
        var bulletP = Instantiate(bullet, gameObject.Find("GasCham").transform.position, gameObject.Find("GasCham").transform.rotation);
        bulletP.rigidbody.velocity = (bulletP.transform.forward * bulletSpeed);
        ammoInClip = ammoInClip - 1;
        nextShot = Time.time+(1/fireRate);
    }
}