Watching sitcoms is a rite of comfort for almost everyone out there. We watch them for the heartwarming friendships, swooning love stories, or just the hysterical punchlines. Since the '70s, sitcoms have had a grip over the audiences and have kept them hooked season after season.

RELATED: 10 Surprising Disney Character Cameos In Other Disney Movies

Better yet, fans feel extremely excited and enthused after spotting a familiar yet out-of-place face in a show. Cameos have been known to keep fans engaged and hooked as it increases the show's fanbase and adds that little element of surprise. But such cameos can often be missed in the blink of an eye and forgotten over time.

Katy Perry in 'How I Met Your Mother'

Katy-Perry with the whole HIMYM gang and Zoey

From numerous memes and catchphrases to heartfelt moments that made us all go “Aww!”, How I Met Your Mother has gathered a tremendous fan following. In the sixth season, we see Ted (Josh Radnor) fall for a married woman who wants to destroy GNB, the company where Ted works (classic Ted, right?).

We are introduced to Honey, Zoey’s cousin, played by none other than Katy Perry. Her gorgeous yet naive character makes everyone go, “Oh, Honey!” The American Idol judge stole the screen with her hilarious character and upped the series ratings. It also acted as a turning point for Perry as her career took off right after her guest appearance. Talk about a win-win!

Prince in 'New Girl'

Prince New Girl 2x1
Still from New Girl, featuring Prince

The emotionally unavailable and eternally angry Nick Miller (Jake Johnson) finally says the three magic words while Jessica Day (Zooey Deschanel) chooses to respond with finger guns. This hilarious episode of season 3 in New Girl features a guest appearance by one of the most famous and beloved musical artists, Prince.

On top of that, the legendary music icon himself reached out to the show’s creators for a guest spot on the show, as revealed by Johnson in an interview. Apparently, Prince was a huge fan of the Nick-Jess relationship, and he wanted to be on the show for them. Prince does eventually help patch things up between the two love birds with his wit, charm, and a few supportive words.

Mark Hamill in 'The Big Bang Theory'

Mark Hamill, Mayim Bialik and Jim Parsons in The Big Bang Theory

We all know how the four male protagonists on The Big Bang Theory were the biggest nerds on earth. The scientists and engineers were huge fans of sci-fi movies, comics, and superheroes. So, you can only imagine the exhilarating thrill Howard must have felt when he rescued a dog who belonged to the OG SkywalkerMark Hamill.

RELATED: 15 Best Episodes of ‘The Big Bang Theory’

The season 11 finale ended with a bang as Hamill officiated the wedding ceremony of Amy and Sheldon as a favor for returning his dog safely. The cast and crew were over the moon with his cameo, and the viewers were positively elated!

Daniel Levy in 'Modern Family'

Daniel Levy Modern Family Still

Before swaying the audience as the witty and charming David Rose, Daniel Levy guest starred in the season 10 episode of Modern Family, "A Sketchy Area," the heartwarming sitcom that boasts a running of 11 seasons. The show has had tons of guest stars on the show like Kevin Hart, Chris Martin, Leslie Mann, and Josh Gad, to name a few. But Levy’s appearance as a sketch artist definitely turned some heads.

He played the role of a courtroom sketch artist who draws an unflattering portrait of Mitch. Cam, being the most supportive and loving husband, undoes the same by gathering some dirt on Levy’s character Jonah and ultimately breaking him.

Jim Carrey in 'The Office'

Jim Carrey in The Office
Image via NBC

With an eccentric boss and an even weirder cast of employees, The Office has become a go-to sitcom when the fans crave a dose of hilarity in their lives. They love chiming in with a “That’s what she said” with the beloved Michael Scott (Steve Carell). The show has had a string of guest stars in its lifetime, including one of the original creators of the show—Ricky Gervais.

One of the most unexpected cameos was that of Jim Carrey in a passing role as the Finger Lakes guy in the season 7 climax. He sweeps the audience with his Canadian accent despite being on the screen for less than 3 minutes.

Victor Garber in 'Schitt’s Creek'

Victor Garber in 'Schitt’s Creek'

In a bit of a Russian doll situation, we see our venerated Moira Rose (Catherine O'Hara) featured in a show on Schitt’s Creek with the Titanic actor Victor Garber. In the tenth episode of the sixth season, Tippy Bernstein (Saul Rubinek) comes as a blast from the past in Moira’s life along with Clifton Sparks, played by Victor Garber.

RELATED: 10 Things You Forgot Happened on 'Schitt's Creek'

They offered a chance for Moira to make a comeback on TV and reprise a role she used to perform so skillfully. The episode turns out to be a riot as the story progresses.

Kathy Bates in 'Two and a Half Men'

Kathy Bates in 'Two and a Half Men' 2x1

After a very public spat between Charlie Sheen and the creators of Two and a Half Men, the story had to be molded to get Charlie Harper out of the picture. So, the show progressed without Charlie, and the writers killed him off in a train accident. But who doesn’t like a friendly ghost of the character showing up to surprise the other characters?

The creators chose to cast the incredibly talented Kathy Bates to appear as Charlie’s ghost to have a brother-to-brother conversation with Alan Harper. Bates came on board after loving the idea, and her stint even led to winning her first ever Emmy!

Adam Sandler in 'Brooklyn Nine-Nine'

Adam Sandler playing himself in Brookyln Nine-Nine cameo
Image via Fox

Brooklyn Nine-Nine has cemented its position as one of the funniest, most inclusive sitcoms in television history. It has had a diverse representation of characters from ethnicity to sexuality. While we laud the efforts regarding characters and storylines, the creators did amazingly well regarding guest cameos.

The fans might have missed out on a cameo by Jake’s (Andy Samberg) favorite John McLane (Bruce Willis), but we saw the smashing Adam Sandler as himself. While being undercover, the That’s My Boy duo rendezvoused in an auction setting where he bid to put a sock in Jake’s mouth.

Robin Williams and Billy Crystal in 'Friends'

Billy Crystal & Robin Williams in Friends

Monica (Courteney Cox) had always wanted to get married and have kids. She knew this from the beginning and always had her eye on the ball. So, in season 3, when things were getting serious between her and Pete Becker, she naturally expected a proposal. When that didn’t happen, she ran to Central Perk to tell the gang about it!

And there, we see Robin Williams with Billy Crystal appear out of nowhere, and they literally did! Fun Fact: their appearance on the show wasn’t planned or scripted! The conversation they have on the couch with each other, while Joey (Matt LeBlanc) interrupts, is entirely improvised and makes it doubly hilarious!

KEEP READING: 10 Cameos No One Saw Coming On 'Friends'