Well I'm 99% sure the problem is calling it a second time, it isn't triggering the event again.
It works if I type the command to que for a different bg, just not if I choose the same bg back to back. It also ques when I open the PvP window which does trigger the event and it shows the slash command worked because it reset my test var that I check before quing (I set it to nil after I've queued).
Would replacing the click with RequestBattlegroundInstanceInfo(bgID) work? The problem I was having before and why I used the click was if I didn't, JoinBattlefield(0) would just queue for whatever bg was last selected. I also tried just changing the value of PVPBattlegroundFrame.selectedBG, though I might have done it wrong or gone about it in the wrong way.
EDIT: Works fine now. Dropped the click for:
Code:
PVPBattlegroundFrame.selectedBG = bgID
RequestBattlegroundInstanceInfo(bgID)