A student spotted the man pointing the firearm in their direction while headed back into the school, officials said.