Drew Barrymore turned to Courteney Cox for comfort as she dealt with a pregnancy scare at age 21.

The 46-year-old, who starred alongside the 57-year-old in the 1996 horror film "Scream," recently opened up about the situation on "The Drew Barrymore Show." Barrymore described how she and Cox "became so close" while filming.

"I remember at the poster shoot I was having a nervous breakdown because I was having a false sense of being pregnant," Barrymore recalled to the "Friends" star. "I kept asking you, ‘How do you know if you’re pregnant? We’re supposed to shoot this poster, but oh my God, I just started dating somebody and how do you know?’"

Barrymore said she "felt safe" confiding in Cox and described her as "the mature, safe person in the room."

DREW BARRYMORE REVEALS SHE'S BEEN SOBER FOR OVER TWO YEARS

Drew Barrymore Courtney Cox

Actresses Drew Barrymore (left) and Courteney Cox became friends on the set of ‘Scream’. (Photo by Dave Benett/Getty Images)

"I was the older one, and I was the right person to ask!" replied Cox.

Today, Barrymore is a mom to two daughters, Olive, 9, and Frankie, 7, whom she shares with ex-husband Will Kopelman.

The fifth installment of the "Scream" franchise, which includes Cox, as well as Neve Campbell and David Arquette, premiered on Friday, nearly 25 years after the original film debuted.

CLICK HERE TO SIGN UP FOR THE ENTERTAINMENT NEWSLETTER

Drew Barrymore single mom

Drew Barrymore is a single mom of two girls. (Getty Images)

Recently, Barrymore opened up to "Queer Eye" star Bobby Berk about the idea of dating as a single mom of two.

"I’m not there yet," Barrymore tearfully admitted. "I have two young girls and, like, I don't want to bring people home… I think it would take me a very long time to meet someone and get to know them before I could even ever introduce them to my daughters."

Berk, 40, assured Barrymore that "being careful" with her children "means you’re a good mom."

CLICK HERE TO GET THE FOX NEWS APP

Drew Barrymore

Drew Barrymore wants to be careful when it comes to her children. (Photo by Dimitrios Kambouris/Getty Images for Empire State Realty Trust)

"And I don't think anybody knows how to do anything, right?" said Berk. "So, don't put pressure on yourself because you don't know how to do it. I think going into it, saying to yourself, 'I don't know how to do it,' is the first step of figuring out how to do it."

"You're an amazing mother, don't question that at all," he added.