Switching my weapons

ya im having trouble making my grenade be able to throw because when i switch me weapon the grenade comes out but when you click to throw it it will just shoot my machine gun

please help me in any way links anything

this script might be of use

function Start () { // Select the first weapon SelectWeapon(0); }

function Update () { // Did the user press fire? if (Input.GetButton ("Fire1")) BroadcastMessage("Fire");

if (Input.GetKeyDown("1")) {
    SelectWeapon(0);
}   
else if (Input.GetKeyDown("2")) {
    SelectWeapon(1);
}   

}

function SelectWeapon (index : int) { for (var i=0;i

Well, I'm no expert... but I'd say that you aren't turning off the machine gun... a solution I can think of would be to add a script that would uncheck the machine gun's prefab... or maybe you could delete the bullets until you finish throwing the grenade... If you gave me your 'game' (assuming respectively) I could see what I could do... send me a P.M. if you want me to try my files...

Thanks -Gibson-