Rigidbody problem

Ive been having a problem with my shooting script. What happens is when I fire the bullet does not move but just drops to the floor.

I have included this line…
Bullet.rigidbody.AddForce(transform.forward * 100);

it may be due to the fact that unity says…There is no ‘Rigidbody’ attached to the “Bullet” game object, but a script is trying to access it.

I have checked and my bullet definitely does have a rigidbody…

Thanks in advance.

Before trying to access the rigidbody, check if there is one. If it’s == null, then add a new one.

I see your variable is called Bullet. Due to the capital letter I’m wondering if that’s a variable or a class name ? The compiler would shout at you though …

Plz help me with my Rigidbody problen. I dont know why but it is going up and not down!I will be plaesed if you help me!!!