When i Instantiate a gameobject and gice it speed it still just falls down?

So i wanna Instantiate a bullet at the end of my barrel and then it needs to go with speed away from the barrel (like a gun works)
But right now when i Instantiate the bullet it just falls down and has no speed, help here thanks.
Here are the code that does it

currentBullets = currentBullets - 1;
            Instantiate(bullet, spawnBulletPos.transform.position, Quaternion.identity);
            rb = bullet.GetComponent<Rigidbody>();
            rb.velocity = new Vector3(bulletSpeed, 0, 0);

I have tried change the position of bulletSpeed to the middle or right 0 but still nothing happens?
Just let me know if you need any more code :stuck_out_tongue_winking_eye:

You are not setting any speed to the bullet you instantiate. You only set a speed for the original bullet you make copies of. The speed of a Rigidbody2D is not serialised so the speed you set to the original one doesn’t carry over to the copies

Try

var newBullet = Instantiate(bullet, spawnBulletPos.transform.position, Quaternion.identity);
             rb = newBullet.GetComponent<Rigidbody>();
             rb.velocity = new Vector3(bulletSpeed, 0, 0);