Prohibition doesn't work
Didn't work for alcohol. Isn't working for drugs. Won't work for guns.
Regulation can work, at least to a degree. You can make it harder for those under 21 to procure alcohol, or for the mentally ill to procure a gun. Sometimes under 21 year olds are caught trying to buy booze, or in possession of it, or drunk from it and they get in trouble with the law and something they want (i.e. a driver's license, to play on the high school football team, etc.) can be taken away from them. That threat stops some of them from doing it. Not all, but if your goal is to prevent teenagers from drinking it is at least a partial success.
The same could be done with guns. There's no reason we can't close gaps in the process to make it harder for those determined to be mentally ill to buy or own guns, closing the gun show loophole, etc. Won't stop them all, but if those gaps had been closed up this tragedy might never have happened. Sure we can't know that as the same black market that supplies drugs also supplies guns. So those who argue it wouldn't have mattered might be right, but they can't know that anymore than someone claiming it would have stopped him could know it. To argue that we shouldn't do something because we can't be sure it works is to argue we shouldn't have any laws at all - because the law against murder doesn't stop all killing, the law against stealing doesn't stop all bank robberies, etc.