Bullet Launcher Script

this is my script i got from unity tutorials, but for some reason on my multiplayer game it rotates downward and doesn’t shoot straight. the bullets start working normal then go downward, then it shoots alot downward and only a few straight

var projectile : Rigidbody;

var speed = 20;
function Update()
if( Input.GetButtonDown( “Fire1” ) )
var instantiatedProjectile : Rigidbody = Instantiate(
projectile, transform.position, transform.rotation );
instantiatedProjectile.velocity =
transform.TransformDirection( Vector3( 0, 0, speed ) );
Physics.IgnoreCollision( instantiatedProjectile. collider,
transform.root.collider );

If you want your bullet to go to infinity, go to the bullet prefab and set the Angular Drag to 0. So it will not slow down.

For better velocity, put a mass like 0.2, less mass, more speed.

This can work :wink:

For more informations of Angular Drag:

You can also check the FPS tutorial of Unity: