Actor Ethan Hawke said Robert Redford was one of the heroes of his life ― but the final thing the Hollywood legend said to him was anything but heroic. (Watch the video below.)

The “Dead Poets Society” star reeled off several warm anecdotes about Redford, who died earlier this month at age 89, on “Jimmy Kimmel Live!” Wednesday.

Then Hawke asked Kimmel, “Can I tell you the last words he ever said to me?’” before revealing that Redford told him, “‘Stop wearing a cowboy hat. People will think you’re losing your hair.’”

Hilariously wise words from a matinee idol who wore hats in such classics as “Butch Cassidy and the Sundance Kid,” “Jeremiah Johnson” and “The Natural” ― but probably not the pro tip Hawke was looking for when they last chatted 18 months ago.

Hawke, who now appears in “The Lowdown” series on FX/Hulu, said Redford kept in touch through the years after Hawke seized up starstruck auditioning for Redford’s 1992 movie “A River Runs Through It.” Redford invited him to try again the next day and told Hawke that he had nailed the scene, but was too young for the part, according to Hawke.

But the Oscar-winning director wasn’t done mentoring him.

A few months later, he showed up unannounced at an off-off-off Broadway show Hawke was in and gave him encouragement backstage, the actor recalled.

Redford also advocated for an unsung 1995 movie Hawke starred in called “Before Sunrise” and premiered it at his own Sundance Film Festival, Hawke said. Even better, Redford took him skiing before the premiere.

But there was a time when Redford drew the line.

Hawke’s documentary series about Redford’s longtime pal Paul Newman, who died in 2008, and his wife Joanne Woodward premiered in 2022. Kimmel inquired whether Redford ever saw it.

“I asked him about it,” Hawke remembered, “and he said he missed Paul too much.”

Hawke’s conversation about Redford starts at 1:36, and his recollection of Redford’s last words to him are at 6:08: