The hammer was moving and striking the firing pin, but not sufficiently to discharge the round.You're saying "click and it won't fire". Is the trigger resetting and it is actually a click with no bang?
If not maybe it's low power ammo or something dirty in the gas system. Gas rings bad maybe.