It’s tough to know what the issue is unless I was able to see the script. I would recommend posting it on the community and I can take a look at it and see what the issue is.
I did cover weapon switching in this course here: https://cgcookie.com/lesson/weapon-switching/
It allows you to modify it for specific button inputs to switch weapons.