There is no 100% foolproof solution. Just like there's no 100% foolproof solution for wars, rapes, child molestation, etc., etc., etc. It is what it is. If we can turn back the clock approximately 100 years, then there's your solution right there, as there was barely any such thing as school shootings 100 years ago and there certainly was no such thing as school shootings involving AR-15s. But, turning back the clock 100 years ain't gonna' happen. Just like, your taking away Americans' Constitutional rights ain't gonna' happen. However, maybe, using your rationale, we should ban mentally challenged people...eh?
Some things we might do which might be helpful...though? Start stressing the fact that keeping guns in the near vicinity of people with mental issues might not be such a good idea. Start perhaps committing people with more serious mental issues. Also, enough with the inundation of drugs for those suffering mental issues. And, start being more aware of those side effects users might be experiencing, even if they have to embarrass the user in order to be aware of that information. Some users might be afraid to inform mental health workers of side effects they're experiencing due to embarrassing reasons. And, mental health workers need to be clear that the users' embarrassments are irrelevant in the face of what negative consequences might arise out of unknown side effects the user might be experiencing. We already know why the Columbine shooters did what they did. So, it's time to start teaching kids to buck up and grow some thick skin, and stop being such pussies. Not, all this horseshit bullying campaign that's going on currently. All that does is make them even bigger pussies. And then, in many instances, a good old-fashioned ass whooping for misbehaving brats might be appropriate. We didn't have as many instances of stuff like this when pop was allowed to take the punk behind the woodshed and paddle his everloving ass.