OK, this can be tricky, but it’s been done before.
What i will be doing for my FPS is have a “state system”
not in the conventional way!
At the moment my shooting scripts read the ammo, clips, fullammo, range (and soon shoot speed, reload time)
What this means is you can easily implement new guns into the game without changing script code.
The script gets the name of the current gun specified in a property on the player. (gun = player["gun])
if you wanted to add gun switching, make another script controlling an empty which is parented to the player, and all the guns are parented to.
you have this script get all the attached sesors (add an always from each gun connected to the script on the empty)
and for each sensor see if the “name of the owner of the sensor” matches that found in the owner gun property.
if not it sets it invisible, and sets it inactive(the bullet script checks if the gun is active, usefull for later)
and then use the pickup to change the name of the current gun in the owner and end itself.s