
Matthew Lawrence starred in Mrs. Doubtfire with Robin Williams when he was just 12 years old, but he says the influence the veteran actor had on his life cannot be overstated.
PEOPLE spoke with Lawrence, 45, ahead of his unmasking as Paparazzo on the Wednesday, April 16 episode of The Masked Singer, and the Boy Meets World alum shared a candid response about why he dedicated his moving performance of Leonard Cohen‘s “Hallelujah” to Williams, who died in 2014 at age 63.
According to the actor, Williams always treated him like an adult, and as a result, the life advice the Oscar-winner shared with him when he was young has proven to be invaluable over the years.
“He really opened up,” Lawrence tells PEOPLE. “I was only 12. I mean this guy … Man, he was just so amazing to be able to give me the respect, almost as an adult, at 12 years old, to really get an open look into his life, the performer side and then also the private side, and how they wrestled with each other.”
Splash News
The ’90s star added that even after filming on Mrs. Doubtfire was complete, Williams stayed in touch. “He stayed a part of my life, you know? That movie could have wrapped [and] like everybody else, he could have gone his separate way, but he didn’t,” Lawrence says.
“He stayed invested and he gave me some incredible life lessons that definitely kept me from some dark places at times. And I’ll just never be able to thank him enough for that.”
The PEOPLE App is now available in the Apple App Store! Download it now for the most binge-worthy celeb content, exclusive video clips, astrology updates and more!
David Livingston/Getty;Ethan Miller/Getty
Ultimately, that’s why Lawrence decided to dedicate his performance of “Hallelujah” to his former costar on The Masked Singer‘s Shrek night.
“One of the main messages that he instilled in me is that when you have a chance to bring emotion, whether it’s comedy or tragedy to someone, you can really help them in their lives in some way,” he shares. “And that was his thing. He was always trying to help people and trying to get people through dark times, because I think he had such dark times himself. That’s what that song felt [like] for me. It was one of those deliverance moments through a tough time, and that is one of the greatest memories that I have with Robin.”
Lawrence and Williams starred alongside Sally Field, Mara Wilson, Lisa Jakub and Pierce Brosnan in the classic 1993 film, which won two Golden Globes. The movie — which follows a father who poses as a nanny to spend time with his children — is almost as enduring as Lawrence’s friendship with the film’s iconic star.
Michael Becker/FOX
For Lawrence, his performance of “Hallelujah” felt like the most authentic onstage experience he had during his time on The Masked Singer, and that was thanks at least in part to it being dedicated to his late friend.
“That was the one that through the costume and the nerves and the fear … for just a moment that I felt like I was actually singing onstage. That was that moment for me. That’s the one from this show that I will take with me because I actually forgot about everything for a moment, and I was just singing.”
Never miss a story — sign up for PEOPLE’s free daily newsletter to stay up-to-date on the best of what PEOPLE has to offer, from celebrity news to compelling human interest stories.
New episodes of The Masked Singer air Wednesdays at 8:00 p.m. EST on Fox.