Justin Theroux revealed the best piece of advice he got about Hollywood and relationships when he started dating Jennifer Aniston

The advice actually came from the "The Morning Show" star's good friend, Jason Bateman. 

Theroux sat down on "Sunday TODAY with Willie Geist" and the host asked if being with Aniston was a "shock to your system" because of all the attention.

"Yeah, I think part of me was like, you know, I'm essentially sort of a character actor and a writer, there’s not much there. Jason Bateman actually once gave me one of the most sage pieces of advice ever when all that was kind of going on," he recalled.

JUSTIN THEROUX SHEDS LIGHT ON DIVORCE FROM JENNIFER ANISTON

"He said, look, in that side of the entertainment industry, a character is about to be born and that character is you, but it's not you. That character is, you know, angry, that character has got a problem, that character is, you know, sweet. It's just this little soap opera that gets written in the margins." Theroux continued.

HOLLYWOOD, CA - FEBRUARY 22: Actors Justin Theroux (L) and Jennifer Aniston attend the 87th Annual Academy Awards at Hollywood & Highland Center on February 22, 2015 in Hollywood, California. (Photo by Jason Merritt/Getty Images)

Justin Theroux and Jennifer Aniston married in 2015 and later split in 2018. (Jason Merritt/Getty Images)

"He said, and so my advice is, don't follow that guy's storyline. And it was a good piece of advice because I stuck to it. And that's the only way you can sort of keep sane and all that," he concluded.

JUSTIN THEROUX CONTEMPLATES WORKING WITH EX JENNIFER ANISTON AGAIN

"The Leftovers" star and the "Friends" alum started dating in 2011, got engaged in 2012, and then tied the knot in a backyard ceremony in August 2015. They later split in early 2018.

Theroux, 49, recently told Esquire magazine that he and Aniston, 52, have remained good friends and still text and call each other frequently.

CLICK HERE TO SIGN UP FOR OUR ENTERTAINMENT NEWSLETTER

"I would say we've remained friends. We don't talk every day, but we call each other," Theroux said. "We FaceTime. We text. Like it or not, we didn't have that dramatic split, and we love each other. I'm sincere when I say that I cherish our friendship."

He described, "We can not be together and still bring each other joy and friendship. Also, she makes me laugh very, very hard. She's a hilarious person. It would be a loss if we weren't in contact, for me personally. And I'd like to think the same for her."