Weaponbob for first person shooter

I’m making a first person shooter game and i want the weapon to bob like in modern warfare 2 when I’m walking. How do I do that???

The easiest way to do complicated and natural movements like that is to animate your weapon with the Unity builtin Animation Editor, or using your preferred 3D modelling program. You should create several animations - aim, shoot, bob walking, bob running etc. - and change smoothly from one animation to another at runtime with animation.CrossFade. Take a look at the Animation Editor and play around with your model.