So you can be 100% certain that there were people in the church carrying guns and yet the shooting still happened.

Actually, restricting guns won't help. There are so many guns in people's hands that stopping sales cold turkey would do nothing. The most effective solution would be to stop selling ammunition.