Pitching Rue’s death in the series finale of “Euphoria” to Zendaya was not an easy conversation, according to the show’s creator Sam Levinson.

“When I pitched her this season and the ending, it was a very emotional reaction,” Levinson said in an interview with Variety‘s Daniel D’Addario for the “Half Hour With” series. “We love the character Rue. [Zendaya] has done such an incredible job bringing this character to life … in the hands of a lesser actor, the character wouldn’t be as charming and lovable and humorous.”

“So it was a tough discussion,” Levinson added. “Even through shooting, it sort of weighed on both of us. At the end of the day, she understood what I was doing, and it felt like the right way to honor Angus, someone whom we loved dearly and really rooted for and saw the best in.”

Levinson, who himself struggled with drug addiction, has spoken about how the narrative arc of Season 3 was largely inspired by Angus Cloud, who played Fezco in the first two seasons and died at age 25 of a drug overdose. In the final episode of “Euphoria,” Rue — after repeated attempts to stay clean — takes painkillers given to her by her boss Alamo (Adewale Akinnuoye-Agbaje). It turns out the pills are laced with fentanyl, and after a dream sequence where Rue returns home and reunites with her mom, it’s revealed that the protagonist died in her sleep on her mentor Ali’s (Colman Domingo) couch.