NEW YORK >> Francis Ford Coppola’s decades-in-the-making, self-financed epic “Megalopolis” flopped with moviegoers, while the acclaimed DreamWorks Animation family film “The Wild Robot” soared to No. 1 at the weekend box office.

“The Wild Robot,” Chris Sanders’ adaptation of Peter Brown’s bestseller, outperformed expectations to launch with $35 million in ticket sales in U.S. and Canada theaters, according to studio estimates Sunday. “Wild Robot” was poised to do well after critics raved about the story of a shipwrecked robot who raises an orphan gosling. Audiences agreed, giving the film an A CinemaScore. “Wild Robot” is likely set up for a long run for the Universal Pictures release.

“Megalopolis,” Coppola’s vision of a Roman epic set in modern-day New York, was never expected to perform close to that level. But the film’s $4 million debut was still sobering for a movie that Coppola bankrolled himself for $120 million. Following its premiere at the Cannes Film Festival, critics have been mixed on Coppola’s first film in 13 years. Audiences gave in a D+ CinemaScore.

By any financial measure, “Megalopolis” was a mega-flop. But from the start, the 85-year-old Coppola maintained money wasn’t his concern. Coppola fashioned the film, which he first began developing in the late 1970s, as a grand personal statement about human possibility.

After three weeks atop the box office, Tim Burton’s “Beetlejuice Beetlejuice” slid to second place with $16 million in its fourth weekend of release. The Warner Bros. sequel to the 1988 “Beetlejuice,” starring Michael Keaton and Winona Ryder, has amassed $250 million domestically in a month of release.

Third place went to “Transformers One,” the Transformers prequel starring Chris Hemsworth and Brian Tyree Henry. After its lower-than expected debut last weekend, the Paramount release collected $9.3 million on its second weekend.

“Megalopolis” was even bested by the Indian Telugu-language action film “Devara: Part 1.” It grossed $5.1 million in its opening weekend for fourth place.