What could have been a fascinating character study reads shallow.

When The D Train premiered at Sundance earlier this year, one scene caused a lot of buzz: an uncomfortably long sexual encounter between co-stars Jack Black and James Marsden. For its theatrical release, the filmmakers have trimmed it to just a few seconds, presumably to avoid an NC-17 rating. It was a necessary financial move (no major theater chain will show an NC-17 flick), but it also lays bare the film’s true character. Absent its shock value, The D Train is just a generic indie that tries to marry edgy humor with real emotional stakes, but they end up canceling each other out.

Black and Marsden play Dan and Oliver, former high-school classmates whose lives get intertwined in the days before their high school reunion. Their paths didn’t cross often in school—Dan was a nerd, Oliver was a jock—and, 20 years later, both are still struggling to break free from their high-school personas. As chair of the alumni committee, Dan sees a successful reunion as his chance for redemption, so he flies out to Los Angeles to recruit Oliver, hoping it will boost attendance.

Though Oliver doesn’t remember Dan, he can’t resist the adulation, and the two have a wild, coke-addled night in L.A. It’s easily the best sequence in the movie. Both actors seem to specialize in drug- and drink-fueled sequences (Black, in particular, is a whiz with such material), and co-directors Andrew Mogel and Jarrad Paul capture the gleeful freedom of a night out on the town with strong comedic energy. At the end of the night, Oliver—who earlier professed his “anything goes” approach to sexuality—makes a move on Dan, who acquiesces. It may sound contrived on paper, but it’s actually a believable moment. Dan is not gay, but he is so desperate to be accepted by the coolest kid in school that he goes along and spends the rest of the film reeling.

So does the film, which never really recovers from this early sequence. It’s not hard to make a night out on the town look like fun, but maintaining a strong pace over an entire film is a bigger challenge, and once Oliver and Dan head back to their hometown, The D Train skips the tracks. Dan becomes obsessed with maintaining their intimacy, at the expense of both his marriage (Kathryn Hahn is typically underserved by her nagging wife role) and his career (same goes for the great Jeffrey Tambor as Dan’s boss). His dalliance with Oliver causes no introspection on his part, nor does it quell his anxiety over his station in life. It only makes him more self-obsessed. In short, Dan is not a very good person, and neither is Oliver, yet both of them dominate the film and leave the more sympathetic characters in the margins.

Such a mistake is not always a fatal; lots of great movies have unlikeable protagonists. But here, the filmmakers get the tone wrong, opting for sitcom-level misunderstandings where they should have dug a little deeper into Dan’s character. The star power and comedic chemistry of Black and Marsden keep the film engaging but highlight their shortcomings as much as their virtues. Despite their best efforts, they cannot elevate the material or make the film’s disparate parts into a compelling whole. Like its characters, The D Train needs a little help figuring out just who it is.

The D Train opens May 8 at E Street Cinema.