Schoolchildren were left “distressed” after a male wearing a mask shot a Nerf gun at them on October 13.
The incident occurred outside Parkgate Junior School on Southwold Road, Watford, and police were called at around 1.20pm.
The shooter, described as aged around 12 years old, walked around swearing at the children while shooting before he eventually left.
Herts Police confirmed that no one was hurt during the incident.
Officers carried out additional patrols in the area and visited the school to give them reassurance.
A spokesperson for the school said: “Unfortunately, we did have an incident outside the school on October 13 where a child/teenager was talking to a small number of pupils through the school fence in a threatening way and using inappropriate language. The child did not enter the school premises and the children were not in any danger, although this was obviously an upsetting incident for them.
“We immediately reported the matter to the police, who visited the school. Police have increased patrols in the area today and will look into the incident.
“We did write to parents to inform them of the incident, with all the information we had at the time.
“Our priority is to make sure that our pupils feel safe and secure at school, and we are making sure the pupils involved are supported.”