Weapon penetrates walls

In my character BP, the gun that is attached to my inherited mesh is outside to capsule component. That causes the gun to penetrate every object in the map. How can I add collision to the gun whitout changing the shape of the capsule component?

just add collision to the weapon itself and set the collision to ignore pawns so it doesnt cause issues if it hits the capsule. i would say just add a basic box collision to the gun by opening the gun mesh and use the options under the collision tab to generate collision.