You need to call <node>.remove() on the weapon object. Save the weapon object handle somewhere and call remove() on it in the removeAvatar() function. You can save a weapon handle by calling avatar.weapon = myphone in your getWeapon() function. When you need to remove the weapon call avatar.weapon.remove().
|