CRYSTAL LAKE, Ill. — In Alabama, a school removed the doors from bathroom stalls to stop students from sneaking inside to vape. In Colorado, a school decided to forfeit a volleyball game after finding “widespread vaping” and other infractions by the team. And in Pennsylvania, at a school where administrators have tried installing sensors to detect vaping in bathrooms and locker rooms, students caught with vape devices face a $50 fine and a three-day suspension.

At least 530 people have been sickened by mysterious lung illnesses related to using e-cigarettes with nicotine or vaping THC, the psychoactive ingredient in marijuana, and at least eight have died. That has sent high schools, the epicenters of youth vaping, racing to give teenagers a new, urgent message: Vaping can be deadly.

Federal health officials have yet to pinpoint an exact cause of the recent illnesses, but the alarming pattern has put principals and teachers into crisis mode. They are holding assemblies to warn students about the dangers. They are getting creative with rules to make it harder for students to secretly vape in school bathrooms, hallways and even classrooms. They are trying to train parents and teachers on the wide array of vape devices, which look like pens or flash drives and which many adults do not even recognize.

During an assembly at one suburban Chicago high school this week, hundreds of students, many dressed in school colors of orange and black in honor of homecoming, saw an X-ray image of a young man’s lungs, cloudy and damaged, on an auditorium screen.