Matthew Perry sent a message of prayer to Bruce Willis after the actor's family announced he was retiring from acting.

Willis, 67, has been diagnosed with aphasia, a condition that affects the ability to communicate.

"Dear Bruce Willis, I'm so sorry to hear what you are going through, but you're still the coolest man I've met in my entire life," Perry wrote to the actor on Twitter. "You will remain in my prayers for a long long time. Maybe we should get together and watch the whole 10 yards and get a couple of hours of sleep."

Perry starred alongside Willis in "The Whole Nine Yards" in 2000 and in "The Whole Ten Yards" in 2004.

Matthew Perry sent prayers to his former co-star Bruce Willis after the actor was diagnosed with aphasia, a condition that affects the ability to communicate.

Matthew Perry sent prayers to his former co-star Bruce Willis after the actor was diagnosed with aphasia, a condition that affects the ability to communicate.

BRUCE WILLIS DISPLAYED COGNITIVE ISSUES, MEMORY LOSS ON MOVIE SETS PRIOR TO APHASIA ANNOUNCEMENT: FILMMAKERS

Willis' family announced the news regarding his health Wednesday on Instagram.

"Bruce’s amazing supporters, as a family we wanted to share that our beloved Bruce has been experiencing some health issues and has recently been diagnosed with aphasia, which is impacting his cognitive abilities," the family statement, signed by wife, Emma, ex-wife Demi Moore, and daughters Rumer, Scout, Tallulah, Mabel, and Evelyn, read.

"As a result of this and with much consideration Bruce is stepping away from the career that has meant so much to him."

Perry and Willis starred alongside each other in "The Whole Nine Yards" and "The Whole Ten Yards."

Perry and Willis starred alongside each other in "The Whole Nine Yards" and "The Whole Ten Yards."

CLICK HERE TO SIGN UP FOR THE ENTERTAINMENT NEWSLETTER

"We are moving through this as a strong family unit, and wanted to bring his fans in because we know how much he means to you, as you do to him," they said. "As Bruce always says, ‘Live it up’ and together we plan to do just that."

Willis' daughter, Scout Willis, thanked fans for the "outpouring of love" she had seen since the announcement.

"The exquisite outpouring of love that I am experiencing right now is just blowing me away," she wrote on her Instagram story Wednesday.

"Thank you all for showing up with so much tenderness and stunning love for my daddio and my whole family!" she added.

Willis' family announced the actor was stepping back from acting following the diagnosis.

Willis' family announced the actor was stepping back from acting following the diagnosis.

CLICK HERE TO GET THE FOX NEWS APP

Following the news, directors, producers and former co-stars who worked with Willis on various movies in recent years are recalling the concerns they expressed over what they viewed as an obvious decline in his ability to perform at his best.

Directors, such as Mike Burns ("Out of Death") and Jesse V. Johnson ("White Elephant") said his lines and monologues had to be reduced as he had difficulty remembering them and even understanding why he was on set.

Fox News' Melissa Roberto contributed to this report.