Matthew Perry wanted a legacy for helping others who battled addiction and sobriety challenges.

Perry died on Oct. 28 after an apparent drowning in a hot tub, law enforcement sources confirmed to Fox News Digital. He was 54. No drugs were reportedly found on the scene and no foul play is suspected.

The "Friends" star has been candid through the years about his challenging journey with sobriety and was planning to establish a foundation to help other addicts before his death, according to People magazine.

Perry previously founded Perry House, a men’s sober living facility in Malibu, California, which he ran for two years before closing the business to find an easier access location to serve more members of the community.

MATTHEW PERRY WAS ‘SOBER’ 2 WEEKS BEFORE DEATH, ‘FRIENDS’ CREATOR SAYS

Matthew Perry smiles during seminar

Matthew Perry wanted to help others who also battled addiction challenges. (Mike Pont)

"That was a Malibu beach house, and it was too expensive to run, and the business didn’t really work," Perry told The Hollywood Reporter in 2015. He ran the facility along with addiction specialist Earl Hightower. 

"So, we’re looking at smaller places in Santa Monica and Studio City," he said. "I’m keeping the business going because I like it; it’s a good way to help alcoholics."

His own recovery journey through treatment paved the way for the Perry House, and after being presented with an award at the Phoenix House in Venice in 2015, he highlighted the need to continue being of service to other addicts.

WHAT ‘FRIENDS’ ARE FOR: TRYING TO MAKE SENSE OF MATTHEW PERRY'S DEATH

"I’ve had a lot of ups and downs in my life and a lot of wonderful accolades," Perry said, "but the best thing about me is that if an alcoholic comes up to me and says, ‘Will you help me stop drinking?’ I will say, ‘Yes. I know how to do that.'"

Perry said that human connection goes a long way: "When you’re having a bad day, the best thing you can do is call somebody and ask them how they’re doing and actually pay attention and listen to the answer to get out of your own head," he said.

Hank Azaria mourned the loss of his "first friend" in L.A. and remembered meeting Perry when they were up-and-coming Hollywood stars.

"Matthew and I became really good friends and we were really more like brothers for a long time. We drank a lot together, we laughed a lot together, we were there for each other in the early days of our career," Azaria said in an Instagram tribute.

Matthew Perry wears blue sweater and t-shirt at event

Matthew Perry died Saturday at his home in the Pacific Palisades. He was 54. (Gregg DeGuire)

Matthew Perry and Hank Azaria posing

Hank Azaria, right, remembered meeting Perry early on in their careers. (J. Vespa)

"I really loved him. A lot of us who were close to him felt like we lost him to drugs and alcohol a long time ago because — as he documented in his autobiography — there was so much suffering."

MATTHEW PERRY CAUSE OF DEATH ‘DEFERRED’: CORONER

Perry released "Friends, Lovers, and the Big Terrible Thing" in 2022. Azaria said, "I had to pick up and put down that biography, like, 11 times, it was so painful for me to read."

He added, "I’m a sober guy for 17 years, and I want to say that, the night I went into AA, Matthew brought me in. The whole first year I was sober, we went to meetings together. He was so caring and giving and wise. And he totally helped me get sober. And I really wish he could’ve, you know, found the – found it in himself to stay with the silver life more consistently."

"But it's heartbreaking for those of us who loved him and knew him really well, personally. We just missed him. We just missed him. It’s one of the terrible things about this disease, is it just takes away the person you love."

"Friends" creator Marta Kauffman remembered Perry being "happy and chipper" during her last conversation with Perry just weeks before "The Odd Couple" star died.

Friends cast smiles at 150 taping celebration

Marta Kauffman and David Crane created "Friends," which ran for a decade on NBC. (NBC)

Cast of "Friends" sitting in front of fountain

Perry was 24 years old when he was cast for the hit series. (NBC)

"He didn’t seem weighed down by anything. He was in a really good place, which is why this seems so unfair," Kauffman told "Today" during an interview with Hoda Kotb. Kauffman recalled speaking to Perry two weeks ago and felt like the "Fools Rush In" star was in a good place.

‘FRIENDS’ CAST REMEMBERS MATTHEW PERRY

"He seemed better than I had seen in a while," she said. "I was so thrilled to see that. He was emotionally in a good place. He looked good. He quit smoking."

When Kotb asked, "Do you know if he was sober at that point," Kauffman said, "Yes, he was sober."

LIKE WHAT YOU’RE READING? CLICK HERE FOR MORE ENTERTAINMENT NEWS

She added, "He learned things throughout this, and what he learned more than anything is that he wants to help other addicts. And it gave him purpose."

Co-creator David Crane agreed that while Perry had a legacy on "Friends," helping addicts was paramount for Matthew.

"That doesn’t surprise me," he said. "As important as the show was and continues to be, I think that absolutely became his purpose, his reason for being."

Courteney Cox, Matt LeBlanc, Lisa Kudrow, Matthew Perry, Jennifer Aniston and David Schwimmer star in Friends

The "Friends" cast remained close even after the final episode aired in 2004. (NBC)

Perry had once said that people would be shocked by his death but not surprised when he died. "Friends" co-creator David Crane said "that was probably true given the journey he’d been on."

"We were all aware of it. There was always a part that was kind of bracing for something like this," Crane said. "It is still hard to believe because he was such a sort of alive person that it’s hard to believe he’s not here."

Perry admittedly spent upward of $9 million on his decades-long substance abuse and sobriety battle. At one point, he was taking 55 Vicodin per day, he wrote in his 2022 memoir.

CLICK HERE TO SIGN UP FOR THE ENTERTAINMENT NEWSLETTER

Kauffman said that once Perry went into treatment, he was "open about it, unless he was using." She expressed concern for Perry during the "Friends" reunion in 2021.

"Knowing that he’d been through everything he’d been through, and every time he had surgery they’re giving him opioids for pain, and the cycle starts over again," she said. "So, yes, I was concerned about what point in the cycle he was in that moment."

Friends cast eats ice cream

"Friends" focused on the lives of six young adults living in Manhattan. (NBC)

The "Friends" cast, which includes Jennifer Aniston, Courteney Cox, Lisa Kudrow, Matt LeBlanc and David Schwimmer, issued a joint statement days after Perry's death.

"We are all so utterly devastated by the loss of Matthew. We were more than just cast mates. We are a family," the statement said via People. "There is so much to say, but right now we’re going to take a moment to grieve and process this unfathomable loss."

Perry, who was born in Massachusetts and raised in Canada, was 24 years old when he began portraying Chandler Bing on the popular sitcom.

"In time we will say more, as and when we are able. For now, our thoughts and our love are with Matty’s family, his friends, and everyone who loved him around the world."

CLICK HERE TO GET THE FOX NEWS APP