The attack took place on the F train at the Coney Island-Stillwell Avenue subway station in Brooklyn.