Bullet Problem

This is my script, But when i shoot it not follow to the point that i set , normally it go to the Z axis, but it not to work … :frowning: Tried

var BulletPrefab : Transform;
var speed = 200;
function Update () {
	if (Input.GetButtonDown("Fire1")){
			var Bulletshoot : Transform = Instantiate ( BulletPrefab, GameObject.Find("Spawn").transform.position, transform.rotation);
			Bulletshoot.rigidbody.AddForce ( Vector3(0,0,speed));
		}
}

When you instantiate your bullet you use “transform.rotation” as rotation for the new bullet. So the bullet is rotated exactly like the object to which this script is attached to.

That’s not really hard to understand. Just think about what you’re doing in your script. Usually the computer does exactly what you told him to do. It seems you just have no idea what you’re doing there, right?