LOS ANGELES — It was a spooky weekend at the box office for nearly everyone but Tyler Perry.

Perry’s comedy sequel “Boo 2! A Madea Halloween” scared up a healthy $21.7 million in its first weekend in theaters, but the waters were rough for other new openers including the disaster epic “Geostorm,” the firefighter drama “Only the Brave” and the crime thriller “The Snowman.”

Made for a reported $25 million, Perry’s film drew a mostly older and female audience, who gave it an A- CinemaScore. “Boo 2!” did a little less business than the first film, which opened to $28.5 million just last year.

The studio expects the film to hold well into next weekend because of Halloween.