Jack Black’s Goosebumps has taken the top spot at the US box office this weekend, amassing $23.5 million from 3,501 theatres. The family-friendly horror comedy is based on R. L. Stine’s series of books and stars Jack Black as a fictional version of the author.

GoosebumpsJack Black stars as R.L. Stine in Goosebumps.

The film’s plot sees a variety of Stine’s characters escape from his books and start chaos in the real world, with the writer, his daughter and their teenaged neighbour tasked with returning them back to the pages of his fiction.

Goosebumps received mostly positive reviews from critics, with some finding it to be the perfect Halloween adventure for families, while others thought it was a little too fast paced at times. For Sony, the film follows the success of Hotel Transylvania 2, which also managed to draw in the family audience last month.

More: Jack Black On His Teenage Drug Use & His Brother’s Tragic Death

Falling to number two in its third week was Ridley Scott's blockbuster The Martian, starring Matt Damon. The film earned $21.5 million domestically from 3,701 theatres, to narrowly miss out on retaining the top spot.

Overseas the film has continued to rake in the big bucks, going past the $300 million mark globally after weekend earnings of $37 million from 74 markets. The film is doing particularly well in the UK where it has taken $27 million, as well as in South Korea which has seen a $21.6 million total to date.

Steven Spielberg’s Bridge of Spies, starring Tom Hanks opened to $15.4 million from 2,811 theatres, taking the number three spot. The film has received overwhelming positive reviews from critics, earning a 93% fresh rating on reviews site Rotten Tomatoes.

More: 'Pan' Bombs At US Box Office, As 'The Martian' Holds Tight

But it was a disappointing weekend for R-rated horror flick Crimson Peak, which earned just $12.9 million from 2,984 theatres to take the number four spot. Starring Tom Hiddleston, Mia Wasikowska and Jessica Chastain, the film was expected to have a better opening weekend, especially with Halloween just around the corner.

Critics were mixed on the Guillermo del Toro directed period flick, with some praising it’s visuals and overall atmosphere, while others found it lacking in substance. The film didn't do much better overseas either, taking $13.4 million from 55 markets for an early worldwide total of $26.2 million.