AHHH Code problem

ok so I’ve been working on my game right but whats happening is switching between weapons, right and this time i got some code, but its not exactly working the way it should be please help

onClipEvent(load){
    this._visible = 0;
    touching = false;
}
onClipEvent(enterFrame){
    if(this.hitTest(_root.WT) and touching == false){
        touching = true;
        switch_weapon = _global.new_weapon1;
        _parent.gotoAndPlay("W2");
    } else {
        touching = false;
    }
}