Something has gone fundamentally wrong regarding upbringing, school and mental health if a 12-year-old gets access to a gun and starts shooting innocent people as a means of "revenge".
I think the police have stated they are not yet aware of a possible motive, we know the child's weapon was registered to a close relative but how they got it and why they used it is still a mystery. Terrible and sad that someone so young felt like taking a life is a valid course of action.