The Modern Family star tells PEOPLE there was "one thing no one remembered to prepare me for" during the judging experience
Credit: Trae Patton/NBC

Cameron Tucker and Gloria Delgado-Pritchett are together again.

Modern Family's Eric Stonestreet and Sofia Vergara reunited during Tuesday's episode of America's Got Talent, marking the first time they've collaborated since their ABC series finale in April.

"My new family and my old family are together!" Vergara said.

In his first of two guest episodes, the actor, 48, joined his former costar, 47, on the judges' panel to fill in for Heidi Klum after she fell ill on set in early spring. Klum, 47, made a brief cameo after the first act and tearfully FaceTimed with judge Howie Mandel, who called to check in with her.

"I was sad to hear Heidi wasn't feeling well, but my first reaction was, 'Yes, of course, 100 percent, absolutely. What time do I need to be there and what do I wear?'" Stonestreet tells PEOPLE about jumping into the production at the last minute.

After memorizing scripts for over a decade on Modern Family, Stonestreet says working with Vergara on an unscripted show was a no brainer.

"Having worked with Sofia for 11 years, I knew how great of a personality she has and how funny she would be on a show like AGT, because anyone who spends any time with Sofia knows she's as funny in person as she is with a script," says the star, who will not be selecting a Golden Buzzer act during his guest stint.

Eric Stonestreet
Credit: Eric Stonestreet/instagram

Meanwhile, it was the first time he had worked with Mandel and series creator Simon Cowell.

"I've been a fan of Howie and Simon for a long time having watched the show. Both of them lived up to well beyond my expectations," Stonestreet says. "They were both kind and welcoming, and made me feel comfortable stepping in on such short notice."

Though he has been a fan of the show, Stonestreet says there was "one thing no one remembered to prepare me for" during the judging experience.

"I felt bad running into a couple of the people that I had to, unfortunately, say no to," he recalls, adding that he came "face-to-face with contestants backstage both who got through, and those who didn't get through."

Credit: Trae Patton/NBC

Of the producers' decision to bring in Stonestreet after Klum's emergency exit, Vergara tells PEOPLE that AGT was "lucky" to book him.

"We were like, 'Oh my God.' I mean, it was not even the coronavirus, Heidi got sick out of the blue," Vergara says. "She couldn't come to work. And then everybody was thinking, 'Oh my gosh. She's got the virus.' That day we needed to judge. So they needed someone."

Klum, who ultimately tested negative for COVID-19, was dismissed from production prior to learning her results.

"It was lucky that Eric was in Los Angeles and that he was available that day. And that AGT was one of his favorite shows," Vergara says. "He really was excited to do it and to be able to do it with me was great, too."

America's Got Talent airs Tuesdays (at 8 p.m. ET) on NBC.