Certain Hollywood actors drew the line when it came to filming specific scenes during their careers.

Fans across the globe grew to love the hit sitcom "Friends" and the major storyline of Chandler Bing and Monica Geller's relationship. Matthew Perry, who portrayed Bing, refused to cheat on Geller, who was played by Courteney Cox, during the show's 10-year run.

Like Perry, John Krasinski did not want Jim Halpert to cheat on Jenna Fischer’s Pam Beesly on "The Office."

Matthew Perry and John Karsinski

Matthew Perry, left, and John Krasinski refused to cheat on their on-screen spouses. (Getty Images)

Here is a look at some stars who put their foot down and refused to film specific scenes.

MATTHEW PERRY'S TOXICOLOGY REPORT ‘SHOULD BE FINISHED,’ FORMER MEDICAL EXAMINER SAYS

Matthew Perry

After Perry's death in October, actress Lisa Cash spoke out about how she was cast to star as Chandler's on-screen affair partner, but Perry said no to the storyline.

"Matthew Perry said the audience would never forgive him," Cash told NBC News. "Matthew Perry went to the writers and said the audience would never forgive him (Chandler), which made a lot of sense."

Courteney Cox and Matthew Perry hug at awards show

Matthew Perry refused to cheat on Courteney Cox's character on the hit sitcom "Friends." (Kevin Winter)

The cheating scene was meant to occur in season five, episode 23, "The One in Vegas: Part 1." Cash did end up appearing on "Friends" as a flight attendant in a scene with Ross Geller, played by David Schwimmer, and Rachel Green, played by Jennifer Aniston. 

Cash completely agreed with Perry's call to nix the scene, even if that meant she did not get a major role on the award-winning sitcom.

Chandler Bing, Monica Geller wedding

Matthew Perry as Chandler Bing and Courteney Cox as Monica Geller during the wedding scene on "Friends." (Danny Feld/NBCU Photo Bank)

"I think he was very right," Cash said. "The Ross and Rachel thing, ‘They were on a break,’ but this wouldn’t have been on a break. This would have been a decision he would have made while they were together."

She continued, "I think it would have really changed how the audience would have (viewed) Chandler and that whole thing. I don’t know if they could have survived it."

A photo of the cast of "Friends"

The cast of "Friends" included, from left, Lisa Kudrow, Matthew Perry, Jennifer Aniston, David Schwimmer, Courteney Cox and Matt LeBlanc. (Jon Ragel/NBCU Photo Bank/NBCUniversal)

In 2017, Perry was a guest on "Watch What Happens: Live with Andy Cohen" where he confessed to a second "Friends" scene he refused to film. 

"There was a storyline on ‘Friends’ where Chandler went to a male strip joint because he really liked the sandwiches," Perry began. "And I called up and said, ‘Let’s not do this one.'"

Perry was successful in his request and the strip club scene never made it into "Friends."

John Krasinski

Similar to Perry, Krasinski could not cheat on his on-screen soulmate.

Fans of "The Office" know that Jim and Pam had chemistry from the very beginning of their co-worker relationship at the fictional Dunder Mifflin Paper Company in Scranton, Pennsylvania. 

Jenna Fischer as Pam Beesly Halpert, John Krasinski as Jim Halpert

John Krasinski refused to cheat on Jenna Fischer on "The Office." (Chris Haston/NBCU Photo Bank)

However, it was not until season six that the couple tied the knot at Niagara Falls.

JOHN KRASINSKI AND ‘THE OFFICE’ CAST RECREATE SHOW'S WEDDING DANCE FOR NEWLYWEDS

In the book, "Welcome to Dunder Mifflin: The Ultimate Oral History of The Office," Krasinski recalled that the script originally called for Jim to have an affair with the new secretary in the office when Pam went on maternity leave with the on-screen couple's first child.

Jenna Fischer and John Krasinski on "The Office"

Jenna Fischer played Pam Beesly Halpert and John Krasinski portrayed Jim Halpert on "The Office." (Vivian Zink/NBCU Photo Bank)

"That’s the only time I remember putting my foot down," the actor recalled in the book written by Brian Baumgartner and Ben Silverman. "I remember saying things that I never thought I’d say before, like, ‘I’m not going to shoot it.’"

To Krasinski, the devoted "Office" fans would not have responded well to Jim's affair.

"My feeling is there is a threshold with which you can push our audience," he said in the book. "They are so dedicated. We have shown such great respect to them. But there’s a moment where if you push them too far, they’ll never come back. And I think that if you show Jim cheating, they’ll never come back."

Jim and Pam wedding on "The Office"

Jim and Pam got married at Niagara Falls on "The Office." (Byron Cohen/NBCU Photo Bank)

Krasinski starred as Jim in all nine seasons of "The Office." The hit sitcom ran from 2005-2013.

Zendaya

Even at 14, Zendaya was putting her foot down in her acting career.

LIKE WHAT YOU’RE READING? CLICK HERE FOR MORE ENTERTAINMENT NEWS

In 2021, the "Euphoria" star told British Vogue that she was scripted to kiss her co-star on "Shake It Up," but she refused.

Zendaya in 2012

Zendaya refused to film a kissing scene on Disney's "Shake It Up" when she was 14. (Paul Archuleta/FilmMagic)

"I remember being on ‘Shake It Up’ and being like, 'I'm not gonna do this,'" she told the outlet. "I'm going to kiss him on the cheek because I haven't been kissed yet, so I don't want the kiss to be on camera.'"

Zendaya was on the Disney Channel show from 2010-2013 as Rocky Blue, starring alongside Bella Thorne.

Ben Affleck

Ben Affleck revealed to The New York Times in 2014 that his Boston Red Sox loyalty runs so deep that he would not wear a New York Yankees hat when filming a scene in "Gone Girl."

CLICK HERE TO SIGN UP FOR THE ENTERTAINMENT NEWSLETTER

Affleck told the outlet that he and director David Fincher got into "a legitimate fight" over the hat, which he called "a one-man riot against the Yankees."

Ben Affleck

Ben Affleck would not film a scene in "Gone Girl" that required him to wear a New York Yankees hat. (Kevin Mazur)

"I said, 'David, I love you, I would do anything for you,'" Affleck recalled. "'But I will not wear a Yankees hat. I just can't. I can't wear it because it's going to become a thing... I will never hear the end of it. I can't do it and I couldn't put it on my head." 

In the "Gone Girl" scene, Affleck reached a compromise with Fincher and sported a New York Mets cap.

Emma Watson

In 2021, Seth Rogen revealed that Emma Watson refused to film a scene in "This is the End." The scene reportedly involved Danny McBride as a cannibal, and Channing Tatum as a "gimp, wearing a leather-thonged mask and on a leash," according to Entertainment Tonight. 

After the interview was released, Rogen clarified his comments about his co-star on X.

Emma Watson, Seth Rogen

Emma Watson and Seth Rogen starred in the 2013 film "This is the End." (Alberto E. Rodriguez)

"Emma Watson did not 'storm off the set' and it's s---ty that the perception is that she did," Rogen wrote at the time. "The scene was not what was originally scripted, it was getting improvised, changed drastically and was not what she agreed to." 

CLICK HERE TO GET THE FOX NEWS APP

He noted that the perception of Watson being "uncool" or "unprofessional" was not true. Rogen said he should have "communicated" his comments better and was actually impressed with Watson standing up for herself.

"We agreed on her not being in the scene together. I was thrilled for the opportunity to work with her and would be thrilled to get that opportunity again. I am very sorry and disappointed it happened, and I wish I had done more to prevent it," Rogen concluded.