Gun swap through collision

Ive been trying to add this feature to my game for a very long time now with no luck what so ever.

What I am wanting to do is start my game with the player holding a gun, the gun being a child of the main camera and being tagged as gun1. When the player collides with an object on the ground tagged as gun2 they swap around, so gun1 is now the object on the ground and gun2 is the child of the main camera. There will also be gun3 and gun4, but the principle is which ever gun you collide with it swaps with the gun attached to the main camera. Can someone help me with this please?

var glock : GameObject;
var UZI : GameObject;
var G36C : GameObject;
var M14 : GameObject;

function Start () { = false; = false; = false; = false;

function OnCollisionEnter(collision: Collision) {
if (collision.gameObject.tag == "UZI"); = true; = false; = false; = false;

if (collision.gameObject.tag == "glock"); = false; = true; = false; = false;

if (collision.gameObject.tag == "G36C"); = false; = false; = true; = false;

if (collision.gameObject.tag == "M14"); = false; = false; = false; = true;

where exactly are you finding problems? are you able to detect when the player collides with gun2?
The player could have a variable storing the current weapon, for instance, so when you collide with another one, you just have to swap their parent objects