Sonic the Hedgehog is a mess of a film, with a mishmash of tones that keeps the disparate elements from ever gelling. Despite the best efforts of a committed cast, including a truly bonkers Jim Carrey, the film never fully finds its footing.

Sonic the Hedgehog opens with a young Sonic (voiced by Ben Schwartz) landing on Earth, and hiding from those who wish to use his powers for themselves. After spending almost a decade on our planet, Sonic has fully acclimated to the small town of Green Hills, Montana. However, he conceals himself from humans out of fear of how they'll respond to him.

RELATED: Getting Sonic Right Was Easier than Dr. Robotnik, Says Film's Director

But when Sonic accidentally unleashes his full power in a moment of self-doubt, he attracts the attention of the US government. They send in Doctor Robotnik (Carrey) to investigate, forcing Sonic to team up with a reluctant local police officer Tom Wachowski (James Mardsen) to try and recover his time and space-traveling rings, which were lost in San Francisco.

The feature directorial debut of Jeff Fowler, Sonic the Hedgehog can't decide what it wants to be -- a silly comedy or a melodramatic story about trying to connect with others. It only finds momentum when it lets loose and has fun with the supersonic speed of the title character. The  action occasionally slows in a manner similar to Quicksilver in the X-Men films to show Sonic rushing around pulling off fight scenes and jokes in quick succession.

When the story focuses on the one-note characters instead, it feels like it's spinning its wheels. The character beats don't really work, with most of them being cliches and not much else. Making matters worse, the film jumps from silly to melodramatic and back in quick succession, keeping it from maintaining a consistent comedic rhythm.

RELATED:Pro Athletes Hype Sonic The Hedgehog's Speed In Super Bowl Spot

To their credit, the cast of the film is doing their best with the material they've been given. Schwartz is adept at the goofier elements of Sonic, but his (usually pretty decent) attempts to infuse the character with melancholy are betrayed anytime Sonic gets into another dated comedy moment. Marsden is given a very predictable role but does well with the goofier elements of the film. Tika Sumpter and Adam Pally both play basic supporting characters as Tom's wife and fellow cop respectively, and both deliver decent enough performances in undemanding roles.

The biggest performance in the film comes from Carrey, who goes for broke with Robotnik, making the mad genius surprisingly likable. The actor's trademark physicality is on full display, leading to the film's best (and weirdest) gags.

Yet, Carrey feels like he's in a different movie than the rest of the cast, who are stuck in a more traditional "unlikely buddy" film. Maybe if the rest of the movie had been at Carrey's level -- or even as committed to a goofy sense of fun as the low-key humor of Robotnik's assistant, Stone (Lee Majdoub) --  the movie would have been able to come together.

For what it's worth, the potential for a weird-and-wild family blockbuster seems to be somewhere in the DNA of Sonic the Hedgehog. The cast is certainly strong, the action can be fun, and if it had been more willing to go big with its odder elements, the film could have been something special. However, instead it's jumbled at best and lackluster at worst. Pop-culture references that already feel dated abound and the story finds convenient ways to halt the plot and keep it from moving nearly as fast as it could -- and should. The movie's inability to maintain a consistent tone trips up what could have been a fun experience, blunting the elements that actually work.

Opening Friday nationwide, director Jeff Fowler's Sonic the Hedgehog stars Ben Schwartz as Sonic and Jim Carrey as Dr. Robotnik, with James Marsden, Neal McDonald, Tika Sumpter, Adam Pally and Natasha Rothwell.

NEXT: Sonic: Wiz Khalifa Goes Old School For Movie's First Single