In taking on double duties for his work in Trolls, Justin Timberlake – who serves as executive music producer and lends his voice to a character in the upcoming animated film – says we can thank the movie gig for his hit song “Can’t Stop the Feeling.”
“It’s been a lot of fun,” Timberlake tells PEOPLE. “Writing the music was part of the pitch for me, Anna [Kendrick] had already signed on which was exciting for me. I would’ve never written a song like ‘Can’t Stop the Feeling’ if it wasn’t for this movie. True story.”
Despite the fact that Timberlake’s catchy track sounds like “him,” the musician/actor says he was focused on writing a song “that could be a big dance record.”
“Listening to [producer] Gina Shay and [directors] Mike Mitchell and Walt Dohrn talk about the movie and how it was really inspired by the ’70s, I started bringing up the soundtrack from Saturday Night Fever, movies where the soundtrack was released before the movie and got people equally excited,” he explains. “The movie seems like an unabashed pop song to me, so I was like, ‘Let’s just write an unabashed pop song.'”
Timberlake adds that he’s sticking with the “pop song” theme for the other music that will be featured in the film, be it covers or original songs.
For more from Justin Timberlake and Anna Kendrick, pick up the latest issue of PEOPLE, on newsstands Friday.
RELATED VIDEO: Did You Hear Justin Timberlake’s New Single ‘Can’t Stop The Feeling’?
“A lot of the songs that were pitched for certain scenes were basically big pop songs at one time and worked really well, the songs we’re covering in the movie,” he says. “So I was like, this feels like DNA to me, this feels like something I can, even the original stuff I write, I can find a way to make it feel cohesive.”
Trolls hits theaters Nov. 4.