'90210' star Luke Perry watched as Lili Reinhart and KJ Apa acted out the scene that he and Shannen Doherty originally performed.

Andy Cohen challenged Riverdale stars Lili Reinhart and KJ Apa to reenact an iconic scene from Beverly Hills, 90210 on Tuesday's episode of Watch What Happens Live with Andy Cohen.

The scene Cohen chose for the two to act out is a breakup scene between Dylan McKay (Luke Perry) and Brenda Walsh (Shannen Doherty) from season two. Perry, who plays Apa's father on the CW series, was instructed to serve as the "artistic director."

Reinhart and Apa made their way to the greenscreen, which helped the two get into character as they were transported to a convertible parked on the beach.

Perry shook his head as his costars prepared for the scene.

"What's wrong?" Apa, who is from New Zealand, began with an American accent. Reinhart responded, "Everything."

After a pause, he said, "It's not the end of the world."

"When we first started going out, I thought you were so sexy," she said. As Reinhart continued her lines, Apa began to quietly laugh and stare at the camera. Perry was also shown laughing. "It was so exciting how we flirted and everybody looked at us and then I fell in love with you."

"I fell in love with you," he said. She continued, "And I trusted you enough to have sex." The line caused the audience to start laughing.

"I know. What are you saying?" he asked.

"It all feels too much right now. Worrying about condoms and birth control pills and getting pregnant and what my parents are thinking," she said. "I think we need to stop seeing each other."

"OK, Bren, stop worrying about what your parents think and worry about how you feel," Apa said as he looked offscreen.

After a brief pause, Reinhart said, "I have. I know what I'm feeling."

Apa, who continued to look in the opposite direction from his costar, said, "No, you don't. You're afraid. That's not enough of a reason."

"I do know what I'm feeling, and I need to break up with you," said Reinhart.

As Apa shook his head and said, "No," Perry was shown nodding in approval of the performance.

"Dylan, I'm sorry," Reinhart concluded as she stared off into the distance. The two high-fived as the audience applauded and Cohen shouted, "And scene!"

Watch the full segment below.