Some states have "red flag" laws, but Pennsylvania is not one of them:
>>>Pennsylvania lacks an extreme risk protection order, known as a red flag law, which allows family members or law enforcement to bar temporary access to firearms for an individual at risk of harming themselves or others.<<<
Even if Pennsylvania did have a red flag law, it's not clear that it would have made a difference because the shooter's father was apparently the owner of the gun, and it's not clear if the shooter's conduct prior to the shooting would have qualified under typical red flag laws.
I've heard unconfirmed second hand accounts of family members in non red flag states telling law enforcement that they were going to take a gun away from a suicidal family member. As I understand it, law enforcement did not intervene and the gun was removed by the family members. Police have some inherent emergency power but I don't know how common this is.