you save and quit a weapon holder in/behind the wall. and put the weapon on the other side of the wall.
A better way would be to interlock a weapon holder so it is just inside of an object. And then put your weapon on the weapon holder.