Metal detector won't protect you from guns, but I'm sure they have a big problem with knives.
The security guards aren't equipped for something like this. They are there for discipline reasons. Rooming hallways and picking up truant kids, breaking up fights, and just getting troublesome kids out of the room.
I am curious if the guard was wearing a flak jacket. When I was in San Bernardino, they did. At that school they had shootings in the past and even last year a parent showed up waving a gun while I was nearby.
The school I work at now in Palmdale (left S.B. for obvious reasons) has many more students and many more security guards, but none wear flak jackets. Though we do have an LA County Sheriff that is at our school almost all day long.