Opioids relieve pain very effectively by activating particular receptors—proteins that are found on cells and respond to specific substances. But these drugs also cause serious side effects, including respiratory depression, which can be lethal. New research could inspire next-generation opioids that provide pain relief with fewer such risks.