Why isn't my pistol colliding with the wall?

Hello guys! So I have a first person player with CharacterController who collides just fine. But attached to the player is a camera and attached to the camera is a gun (for shooting script purposes) with a box collider (I don’t like mesh colliders). However, whenever I run into a wall the player collides perfectly but the gun just goes right through. Why does this happen and how can I stop it? Thanks for the help!

does the gun have to collide? there is different ways to make the gun appear to “not” collide with an object.

here is a tutorial on the solution i think is best for you, 26. Unity Tutorial, WEAPON CLIPPING - Create a Survival Game - YouTube ,
it simply makes it so that your weapons doesn’t appear to be clipping through a wall, when it actually does.

also having a collider infront of your characterController can cause problems with the collision/walking on the player.