After news broke of actor Luke Perry’s untimely death on Monday, a common refrain rose among Gen Xers: “Can you believe there’s an entire generation who won’t remember him as Dylan McKay from ‘Beverly Hills, 90210’?”

They’re not wrong. Hulu carries the series, which aired on Fox in the 1990s, but those born throughout and after its original run are too young to know the feeling of tuning in every Wednesday night to witness Perry’s tender portrayal of the brooding bad boy. They must instead get their fill of modern teen soapiness from shows that might not have existed had it not been for “90210” and its peers setting the stage; shows like “Riverdale,” the CW’s grim adaptation of the Archie Comics.

Luckily, that means the youths of today are still acquainted with Perry’s heartwarming presence — just in a different capacity. In 2017, nearly two decades after “90210” ended, the actor once again found a home in teen programming as Fred Andrews, the scruffy single father of “Riverdale’s” own rebellious heartthrob, Archie (KJ Apa). Fred serves as the moral compass of a show fueled by murder mysteries and morally ambiguous characters. With his gentle spirit and hard-earned wisdom, he is a grounding force for a teenage son wandering with his head in the clouds.

Perry died this week after suffering a stroke at 52, and creator Roberto Aguirre-Sacasa tweeted Wednesday that the episode airing that night, as well as “the rest of our run,” would be dedicated to Perry. The episode ended with a black screen on which the words “In Memoriam” appeared above Perry’s name; below were the years he lived: “1966-2019.”

Fred doesn’t appear until late in the episode, and his main line is as characteristic as can be: “You’re not an idiot, son,” he sighs, bandaging Archie’s latest wounds. “You’ve just got a big heart.” The context of his remark, which involves the naive teenager trusting the wrong person, is irrelevant. No matter how ludicrous a situation Archie finds himself in — and “Riverdale” certainly tests the limits — Fred will stand by him. He may do so with a furrowed brow and narrowed eyes, but he’s there.

And he always has been. Much before the show entered its mystical phase, Archie was a normal jock facing normal challenges — by “Riverdale” standards, anyway. After his parents split up, his mother moves halfway across the country. He returns to school after a summer fling with a teacher, only to discover that his childhood best friend Betty (Lili Reinhart) has been harboring a crush on him. He attempts to juggle football practice and the prospects of business school with his new passion, music, but struggles to do so. Amid this all, the small town tries to solve the murder of another Riverdale High School student.

Their bond strengthened by turmoil, Archie often turns to his father for advice. But instead of telling him what to do, Fred encourages Archie to listen to his gut: “If you know it’s the right thing to do, even if it’s tough, even though it might cost you, you gotta do it,” he tells him in the first season.

Such lessons arrive as early as the pilot, when Archie tells his father he can’t work at the family construction business because he’s heading to football practice, but tells his football coach that he can’t play anymore because his father needs him to work. Fred eventually discovers Archie strumming a guitar on their porch and isn’t as hurt by his son’s chosen passion as he is by the lies surrounding it.

“That’s it? We don’t talk anymore?” Fred says, his eyes weary but kind. “I would never force you to play football. I don’t care if you play football, and you don’t have to work with me or for me ever again. But some advice, man to man? These decisions that you’re making now, son, they have consequences. They go on to form who you are and who you’ll become. Whatever you decide, be confident enough in it that you don’t have to lie.”

Like Perry, many of the “Riverdale” parents were once young stars themselves, with ’80s idol Molly Ringwald as Archie’s mother, “Twin Peaks” actress Mädchen Amick as Betty’s, “Scream” actor Skeet Ulrich as the father of their classmate Jughead (Cole Sprouse) and “Head of the Class” star Robin Givens as the former mayor. Fred is easily the most stable of the lot, a man who holds honesty and sincerity above all else. (It’s no wonder the bulk of Season 2 involves Archie’s desire to avenge the attempted murder of his father.)

That isn’t to suggest Fred is perfect, and Perry’s compassionate portrayal — plus an enlightening flashback episode in the show’s third season — hints at shades of a wild past. This is a man whose life hasn’t gone the way he once thought it would, but who learns to roll with the punches. He loses a mayoral election to his former girlfriend after she relies on deceitful tactics to win. But instead of lashing out at her, or her malicious husband, Fred reserves his anger for when they eventually endanger his son.

In the end, Fred’s penchant for goodness in the face of adversity isn’t so dissimilar from that of a young man named Dylan McKay. Perry approached each role with empathy, which “Riverdale’s” executive producers highlighted in a statement following his death.

“Luke was everything you would hope he would be: an incredibly caring, consummate professional with a giant heart, and a true friend to all,” they said. “A father figure and mentor to the show’s young cast, Luke was incredibly generous, and he infused the set with love and kindness."

Read more: