Kevin Hart is one of the funniest actors working today. Tiffany Haddish is one of the funniest actresses working today. Put them together in a comedy, and, for good measure, add some solid supporting performers like Rob Riggle, Ben Schwartz, and Keith David, and the result would seemingly be guaranteed hilarity. Unfortunately, the current Hart/Haddish collaboration, Night School, only cashes in on a handful of its opportunities for laughter.

In Night School, Hart plays Teddy Walker, a former high school hotshot who walked out on his big final exam because he couldn’t concentrate. For years, he has done reasonably well, despite being a dropout, as the top salesman for an outdoor grill company. Teddy also has a gorgeous, successful girlfriend, Lisa (Megalyn Echikunwoke), who doesn’t know about his lack of education. Alas, Teddy’s happiness doesn’t make it through the first act of Night School, ending with a literal bang when he accidentally blows up the store where he works (hint: lighted candles around gas grills are not a good idea). With the store now closed, Teddy is out of work and reduced to a job at a fast food restaurant where one of his duties is standing outside dressed as a giant chicken to attract customers. Fortunately, Teddy’s old high school friend Marvin (Ben Schwartz) is willing to give Teddy a job as a financial broker if Teddy can just complete high school.

Without telling Lisa about his misfortune or his plans, Teddy enrolls in adult night classes at the local high school. His attempts to charm and fast talk his teacher, Carole (Haddish) fail dismally, as she insists that Teddy and his classmates actually do their classwork. Since none of his fellow students seem optimistic about their chances of passing the upcoming tests, Teddy soon convinces them to break into the school at night to steal the exams. They succeed, but Carole figures out what they had done. Teddy takes the rap for the entire class, and Carole eventually agrees to give him one more chance. She also discovers that Teddy has a variety of learning disorders that make traditional learning and successful test taking extremely difficult for him.

Night School is one of those comedies with a screenplay that seems to have been assembled by committee, in this case, six credited screenwriters, including Kevin Hart (whose contribution may well have been some improvised monologues). Movies of this nature rarely work, primarily because they can never achieve a consistent tone. Here, the film’s disparate elements become apparent in an overlong scene in which the various students tell their life stories. They include Mac (Riggle), a dense jock, Jaylen (Romany Malco), a futuristic conspiracy theorist, Theresa (Mary Jane Rajskub), a housewife who dropped out when she got pregnant in high school, Bobby (Fat Joe, a prison inmate, and Luis (Al Madrigal), who lost his job as a waiter when Teddy tried to stiff a fancy restaurant out of a huge check.

These characters are all very familiar types, and, instead of giving them a variety of funny things to say and do, the script provides each with a single quirk (such as Luis saying “hi-yen-ist” instead of hygienist), which is then repeated over and over throughout the movie. To their credit, some of the cast, particularly Riggle and Madrigal, handle their extremely limited opportunities for laughter well. Others, like Malco, seem entirely lost, as his babbling about robots and technology just aren’t funny.

The least funny character in Night School is the obligatory foil for Teddy, in this case, school principal Stewart (Taran Killam), a former dorky classmate of Teddy’s who still holds a grudge against him and is now an all-around martinet and total jerk. His particular character quirk is the misuse of street argot in a ridiculously lame attempt to sound black. The concept is somewhat dumb to begin with, and the execution is even worse, with Killam coming off as the last place finisher at a comedy club open mike contest. Then, to make matters worse (at least from a comedy and credibility standpoint), by the end of the movie, Stewart realizes the error of his ways and tries to become a nice guy. That’s a worn-out staple in “family-friendly” films (Night School has a PG-13 rating, mainly because Kevin Hart keeps his language somewhat in check), and a sign of sloppy screenwriting here.

It would be difficult for a movie boasting as much comic talent as Night School has to be completely devoid of humorous moments, and, indeed, the film can be quite funny at times. The best scene occurs when Teddy and Carole meet for the first time, while they are stopped at a traffic light. The encounter quickly becomes heated as the insults start flying between them. Hart and Haddish are at their best here, and the scene has the feel of sheer improvisation by two of the best. But the rest of the movie doesn’t really have another scene that comes close in terms of comic intensity. The lengthy break-in/test stealing sequence, in particular, comes off as a rejected Three Stooges script.

The best supporting performance in Night School is from an actor who is not that well known for comedy, veteran Keith David, who plays Teddy’s long-suffering father. He only appears in a couple of scenes, but his slow burns are terrific. Actually, the scenes of Teddy’s family life are the funniest overall in the movie, since, unlike the various bits of school and work humor, the script doesn’t beat the same handful of jokes into the ground here with constant repetition.

My guess is that the filmmakers, director Malcolm D. Lee, in particular, were going for a more realistic, inspirational movie that what audiences are used to seeing in Kevin Hart films. As a result, Night School at times seems caught in a limbo between an afterschool special, albeit one with a heck of a cast, and utter silliness. That it comes off as well as it does is a tribute to Tiffany Haddish more than the efforts of Hart. As she did in Girls Trip, Haddish takes an ensemble supporting role and elevates it to near co-starring status (a publicity campaign designed to cash in on her newfound fame doesn’t hurt either). Night School has its heart (and Hart) in the right place, although the emotion at the end is a bit much. And it does have enough funny moments to keep undemanding fans of its stars reasonably happy. But as a comedy, it certainly doesn’t graduate with any honors.