They had an armed guard who didn’t shoot until the gunman had started shooting. The guard should probably have started shooting as soon as the gun came out. Perhaps he wasn’t in the room.
There were also apparently quite a few cops in the building. Theres a CNN video showing quite a few armed people coming in shortly after the gunman was shot. Some of them had rifles.
He had already shown his demeanor with the spray-paint and the gun just confirmed it. If the guard wasn't in the room until after the shooting started that is bordering criminal. Waiting to see if he might shoot leads to more deaths.
The fact he had zero skills was the fortunate thing.
The guard came into the room BECAUSE he heard the first gunshot fired. I watched it on TV (one of the few times I have watched TV lately, other than football games).