That is one of the big hurdles to keeping firearms out of the hands of mentally unbalanced people. If they legally buy them, then "go nuts", how do you get the guns back? Have a court determine mental status, then issue an order for confiscation?
Fine... on the surface that sounds reasonable (except for the poor schlubs that have to go knock on the door and demand that the crazy person hand over his guns.... )
...... BUT... who gets to decide what is "legally incompetent".... what if a liberal/progressive/atheist judge decides that anyone that believes in the Bible, or is a "born again Christian" is somehow mentally disabled? Or, if you use corporal punishment on your kids, you are somehow abusive and mentally unstable... Or, if you are a member of the "Tea Party", you are mentally unstable.
You see how this could go south pretty quickly?
"Oh, we're only going to restrict sales on ASSAULT RIFLES".... now, we get to define what an "assault rifle" is.... funny, but that definition includes about 2/3 of all firearms being sold.... semi-automatic .22 rimfires, shotguns, pistols.....
This is why many of the so-called "gun nuts" want NO more infringement on the right to keep and bear.....