Slim Shady has a key role in “Happy Gilmore 2,” and Adam Sandler just revealed how he was able to get the Detroit rapper to act in the comedy sequel.

In an interview on the “Dan Patrick Show“ with Dan Patrick, who is also in the film, Sandler said he really didn’t want to bother Eminem to be in the movie.

May be an image of 2 people and text that says '" Eminem was hilarious. There is one hour version of of just Eminem that makes you laugh. That was an amazing day on set. He came to play. -Adam Sandler'

Sean ‘Diddy’ Combs accuser sues Harvey Weinstein for sexual assaultSean ‘Diddy’ Combs accuser sues Harvey Weinstein for sexual assault

“I love Eminem. I’m friends with Eminem, but I don’t want to bother the man,” Sandler told Patrick. “And everybody kept saying, man, Eminem would be so funny in this part. And I was like, I don’t want to ruin this guy’s time. He’s hanging out. He’s in Detroit. He’s doing his life making records.”

Sandler says he did end up getting in touch with him, and the rest is film history.

“And then I started going, but it certainly would be funny if he did it. So, then all right, let me bug Marshall and give him a call and say, dude, I know it’s a pain in the a$$, but it’s pretty funny. You mind shooting out to us for a day? And then he’s like, yeah, yeah, send me the stuff. And then it goes like that. That’s how it goes down.”

Patrick then mentioned that Eminem was in “Funny People” with Sandler, who then revealed how the two met for the first time.

“I remember the first time I met him. I was at ‘SNL.’ I wasn’t on the show anymore. And I was at a table with all my guys and he was the musical guest with Dre and we were at the afterparty, and then Marshall walked by our table and he he looked at me and I looked at him, like, oh yeah, that kid’s pretty damn cool, and then he goes Bobby Boucher, something like that. I go, oh yes, that’s what’s up, Marshall. And then we became friendly after that.”

Eminem plays the son of Donald, portrayed by actor Joe Flaherty in the original film. Donald heckled Gilmore on the golf course. Flaherty passed away last year.”

Speaking to ePro, Sandler also revealed there are a lot of bloopers involving Eminem.

“Eminem was hilarious,” Sandler said. “There’s an hour version of just Eminem that makes you laugh. That was an amazing day on the set. He came to play.”

Eminem is also starring a documentary he produced called, “Stans.” The film hits theaters on Thursday, August 7.