Need help with bullet/gun scripting

Hi!! Im new to unity. I have my gun script, spawn point, bullet, and gun. heres my script.

var Bullet: Transform; function Update () { if (Input.GetButtonDown ("Fire1")){

var bullet=Instantiate(Bullet,GameObject.Find("Gun_Spawn").transform.position,Quaternion.identity);
bullet.rigidbody.AddForce(transform.forward *2000);

}

} but every time I hit Fire1 (Left mouse) the bar at the bottom of the screen says, Theres no rigidbody attached to clone, script still searching?? I dont know what to do?? and I also need a script to destroy the bullet. Can any body help?? Thank you for the time.

well logic would dictate that you should add a rigidbody component to the prefab that your script is trying to instantiate

You are saying: `bullet.rigidbody`. But the bullet doesn't have one. Unity3D throws you a `NullReferenceException`. To solve this: add a new RigidBody component.

If your bullet is a prefab, you can just add it in your editor.

If it is a class that you are creating from code somehow, use a script:

bullet.addComponent(new RigidBody());

will probably work.

The problem is that your bullet prefab does not have rigidbody attached.

just to remind you also in unity variables should be started with small letters.