In David Koepp’s “Ghost Town,” at least five characters look into the distance and try, unsuccessfully, to hold back tears. These choked up moments aren’t what you’d expect from a comedy that treats death like a lame after-party for the not-so-cool kids, but performances from Ricky Gervais and SNL’s Kristen Wiig almost compensate for all of the crybabies.

Though British comedian Gervais is an expert at playing douchebag losers, as he did in his role as the self-important boss in the British version of “The Office,” in “Ghost Town” he plays a more likeable loser: a lonely yet misanthropic dentist named Bertram Pincus. He’s the kind of grumpy, reclusive man who considers a colonoscopy to be a “gross invasion” of his privacy, so when he gets said procedure done by a ditzy, spray-tanned doctor played by Wiig, it’s hard not to laugh at his mental torture.

The doctor’s incompetence is confirmed when Pincus leaves the hospital with the ability to see dead people. Though he is still alive, an accident during the colonoscopy has rendered him as the only living human in Manhattan who can communicate with the deceased.

Ghosts begin flocking to the apathetic Pincus with requests and favors, but smooth-talking alpha ghost Frank, played by Greg Kinnear, bullies him into actually listening. Pincus shows an adorably vulnerable side when he learns that he must interfere with the love life of Frank’s widow. Though she is played by Téa Leoni, an actress who slaughters Gervais on the 10-point attractiveness scale, there is still believable chemistry between the two. She turns out to be a bookish loser in her own right, with occupational perks that include observing mummified penises.

Despite the goofy situation, “Ghost Town” screenwriters Koepp and John Kamps insist on being sweet, ultimately holding back on potentially hilarious gags. The most frustrating almost-laugh occurs when a dental mold gets stuck inside of a patient’s mouth, only to be easily removed a few seconds later.

Gervais is surprisingly charismatic, but like many feel-good comedies, this film is choppily divided into a funny half and a lagging, more serious half. In a film where being hit by a bus is supposed to be comical, it’s annoying that Koepp felt obligated to end the story on such a sentimental note.

Print