Ty Burrell, Julie Bowen, Josh Gad

The Book of Mormon's Josh Gad will make his Modern Family  debut on Wednesday — and if you can imagine, his character is even more awkward than Phil Dunphy (Ty Burrell).

"He grew up in the neighborhood and used to be the Dunphys neighbor," Gad tells TVGuide.com. "He winds up coming back and visiting them. They're very surprised by what he's done with himself because he was not necessarily going to make much of his life and quite the opposite happens."

Modern Family partners with Greg Kinnear for guest spot

Gad has producers Chris Lloyd and Steve Levitan to thank for landing the role. He previously worked with the Modern Family duo on Fox's short-lived comedy Back to You. "We had been trying to pair up for a while to work again together, and one day they called me up and said, 'We have this great character and if you can get a second to break away from your day job, we'd love for you to come and do it," he says. "I, of course, complied because this show is a little bit of a hit, but I felt like it needed my presence in order to get to that next level."

The logistics of getting Gad to Los Angeles to shoot the role weren't as simple as him actually landing the plum part. The Book of Mormon actor flew out to L.A. Monday morning, hopped on a Red Eye that night and hit the stage Tuesday night for Mormon. Still, he says, it was completely worth it. "It was a reunion of sorts with Ty Burell, who was on Back to You, and Jesse Tyler Ferguson and I got our starts in The 25th Annual Putnam County Spelling Bee on Broadway together. It was so rewarding and I would do it all over again."

Watch full episodes of Modern Family

Despite the chaotic lengths Gad took to shoot Modern Family, he hopes this isn't the last we see of him on TV. "My goal is to fly every Monday for the next year to go do a guest role on every single show currently shooting just to say I did," he says with a laugh. "We'll just start with the CSIs, knock them all off."

As for his time on Modern Family, Gad points to a particular scene that made his time worth it. "The most fun element of the entire shoot was this physical comedy bit that Ty and I got to really create from scratch," he says. "It's an old meet-and-greet handshake that goes just so far and is so unnecessarily elaborate." Check out what scene Gad is talking about in this sneak peek below: