Matthew Perrywas “incredibly happy” and “having fun” prior to his death, a source tells PEOPLE.

Five days before his death,Perry posted an Instagramof himself inside a hot tub. He captioned thephoto, “Oh, so warm water swirling around makes you feel good? I’m Mattman.”

It was the sixth in a series of “Mattman” posts he shared after watching 2022’sThe BatmanstarringRobert Pattinson.

The day before the hot tub photo, the actorposted a videoof the moon and wrote, “Do you understand what I’m trying to tell you? - I’m Mattman.” On Tuesday, Perrypostedon X and said, “Let’s make stigmas a stigma. -I’m Mattman #mentalhealth.”

The actor’s love for Batman was well-documented, including in his memoir,Friends, Lovers and the Big Terrible Thing, where he proclaims several times, “I’m Batman. " In fact, the book concluded with a chapter titled “Batman.”

“Someday you, too, might be called upon to do something important, so be ready for it,” he writes in the final lines of the book. “And when whatever happens, just think,What would Batman do?and do that.”

According to a source, Perry’s recent posts about “Mattman” stemmed from an idea the actor had been working on for a series. “He was having fun,” says the source.

The source says Perry also had just signed on to act in a new drama film,Unworthy, which was on hold due to the strike, and had recently moved into his new home after renovating it.

“He was incredibly happy,” the source adds.

Matthew Perry.Newsmakers/Getty

Matthew Perry

Newsmakers/Getty

TMZ firstreportedthe actor’s death, citing law enforcement sources who told the outlet that there were no drugs found at the scene, and no signs of foul play were present.

Later on Saturday, A spokesperson for the Los Angeles Police Department told PEOPLE that officers responded to a call at Matthew’s address regarding the death of a male in his 50s, though authorities would not confirm the deceased’s identity.

Noam Galai/Getty

Matthew Perry SNL

A year before his death, Perry detailed what legacy he would want to leave behind. “I would like to be remembered as somebody who lived well, loved well, was a seeker,” the actor told Tom Power on theQ with Tom Powerpodcastin 2022. “And his paramount thing is that he wants to help people,” Perry added. “That’s what I want.”

source: people.com