My bullet shoots sideways, help!?

here’s the script, can someone point out why my bullet shoots sideways instead of straight?

cheers

var Bullet : Transform;
var Spawn : Transform;
var BulletSpeed = 100;

function Update ()
{
if(Input.GetButtonDown(“Fire1”)){
Fire();
}
}

function Fire()
{
var Bullet = Instantiate(Bullet,Spawn.position,Spawn.rotation);

Bullet.rigidbody.AddForce(transform.forward * BulletSpeed);

}

try

Bullet.rigidbody.AddForce(spawn.forward * BulletSpeed);

spawn.forward will be the blue axis of the spawn.

transform.forward is the blue axis of whatever object this script is attached to, but doesn’t give the desired effect because your model is probably rotated.

Why dont u try something except forward like sidewalk(i mean u probbably want to shoot in X axis not Z) or sth i myself usually call this function like this:
Bullet.rigidbody.AddForce(BulletSpeed,0,0);

/AddForce(x,y,z) look in which direction u want to shoot it maybe your objects are in way that u need to shoot them in x Axis(red one) or in some 2D games u may want to shoot them up!/