[SPOILER ALERT AHEAD.... Stop reading if you want it to remain a surprise.]

The upcoming Foo Fighters Studio 666 movie is fun not only cause the band is making a horror film set in the rock world, but also for the amount of guests that turn up in the movie cast in assorted roles.

One of the surprise cameos in the film comes from one of Hollywood's top directors who has dabbled on multiple occasions with horror-themed films, John Carpenter. The legendary director's credits include Halloween, The Thing, Christine, Prince of Darkness and In the Mouth of Madness and he came to the film through a bit of a "six degrees" situation.

Speaking with Deadline, Dave Grohl revealed, "This is probably the craziest coincidence or story involved in the whole film. When we started pre-production for the movie, I mentioned it to our lighting designer Dan Hadley. He’s been with us for a million years. Dan went out on tour with John Carpenter, when John went out to perform his music. Dan said, 'You should call John Carpenter and see if he’ll make a cameo.' I said there’s absolutely no fucking way that he’ll ever do this. Dan gave me his email so I totally blind cold emailed him and said, 'Hi, my name’s Dave, we have a mutual friend, Dan Hadley. We’re making a horror film, wondering if you’d consider doing a cameo.'"

But according to Grohl, it was another connection unbeknownst to him that led to Carpenter saying yes. "Little did I know that John Carpenter’s godson [and The Kinks’ Dave Davies’ son] is Daniel Davies. Daniel is in a band that we took on tour with us 15 years ago [Year Long Disaster]. John Carpenter responds and says, 'Because you treated [Daniel] so well on tour 15 years ago, not only will I make a cameo in your film, but I’ll also write the theme song.'"

The Foo Fighters frontman adds, "It was the most incredible thing. I did not expect it. I could not imagine it. It happened and when he sent that song, we all got goosebumps. I mean, it can only be John Carpenter. Some people might hear it and think that just sounds like John Carpenter. It is."

Further elaborating on his love of horror films, Grohl cited Amityville Horror as the first horror film he remembers, and he recalls The Exorcist filming near where he grew up in the Washington, D.C. area. He also names Friday the 13th and Evil Dead among his favorite horror films.

Foo Fighters' Studio 666 will be released on Feb. 25. Get your tickets here.

10 Must-Watch Horror Movies That Are Totally Metal

More From Loudwire