Robin Williams, Sarah Michelle Gellar

On the set of The Crazy Ones, it's all fun and games until Robin Williams starts riffing on colonoscopy videos. Then things just go batty. "I bet you haven't seen one in HD and 3-D," he says, waving a DVD. "I'll get you a copy overnight. Hold on, I'll call Fecal Express."

Thirty-two years after uttering his final "nanu nanu" on Mork & Mindy, Williams is back in manic mode on a primetime half-hour comedy, this one from Ally McBeal and Boston Legal creator David E. Kelley. Williams plays Simon Roberts, a loosey-goosey Chicago advertising executive whose tightly wound partner and protégée, Sydney (Sarah Michelle Gellar, of Buffy the Vampire Slayer fame), also happens to be his daughter. Imagine Don Draper teaming up with Sally a few decades on, except with Red Bull instead of martinis and everybody hashtagging the fun on Twitter. "Our characters are a great combination," Gellar says between scenes. "I'm trying to prove myself while he's proving how totally embarrassing parents can be."

Thankfully, the disc in Simon's hand turns out to be work-related rather than medically invasive. It's a commercial for an insurance agency that re-creates the moment Simon taught Sydney how to drive. No matter that he traumatized her so much she never drove again. "Simon's a guy who can sell anything," Williams says. "He could sell Frappuccinos to Starbucks. He could sell clouds to God."

Whether audiences will buy The Crazy Ones is a question only the Nielsens can answer, but CBS is betting big on its most talked about new series. In his first foray into 30-minute comedy, Kelley serves as head writer and all-knowing force behind the scenes. "We don't see David as much as have sightings," Williams says of the famously reclusive producer. "It's like spotting Bigfoot. 'Hey, was that David? No, must have been a deer.'"

The vibe is more social at fictional ad agency Lewis, Roberts & Roberts. Account exec and office Lothario Zach is played by James Wolk, who broke out as the mysterious Bob Benson last season on Mad Men ("The joke is that I'll only do advertising roles," Wolk says). Hamish Linklater (The New Adventures of Old Christine) is the agency's buffoonish art director, Andrew, and Amanda Setton (The Mindy Project) plays Lauren, an assistant "much smarter than she first ­appears," the actress says.

Big brand names surface on a per-episode basis. For the sake of realism, the show uses actual companies as clients (though they don't pay or get script approval) and A-list guest stars playing versions of themselves. In the premiere, the agency helps McDonald's sex up the old "You Deserve a Break Today" jingle with an assist from Kelly Clarkson, who in turn gets Sydney to belt one out. "I barely survived Buffy's musical episode," Gellar says. "If you ask me to sing badly, that I can do well. But here they said, 'You're going to sing, and you're going to do it with Kelly Clarkson.' I'm like, 'Wait. What?'"

Still, Williams is the big sell. "The part was written with Robin in mind," Kelley says. We know when we meet Simon that he is an industry titan. But is he happy? Wistful? Self-satisfied? Insane? "Probably a little from each category," Williams says, taking a break in his trailer. At 62, the actor is graying at the temples but still boyish, wearing fluorescent green sneakers with a crisp shirt, vest and tie. "Simon's a guy with a lot of nuance. He's lived hard and been on the edge for a long time. Multiple marriages, rehab, even rehab in wine country. Trust me, I've done the research myself."

Williams's career first took off in the late 1970s, when he starred as ­hyperactive alien Mork on Mork & Mindy. But his personal life faltered. "It was high times in many ways," he says. "Our show shot on the Paramount lot next to Happy Days, which shot next to Laverne & Shirley, which shot next to Taxi. We'd all wrap around the same time and the partying would begin, at least for me."

Over the years, drug and alcohol problems, relapses, relationship troubles and open-heart surgery were like pins to Williams's ballooning success. And yet he managed to find role after leading role in films like Dead Poets Society, Aladdin, Mrs. Doubtfire and Good Will Hunting, which earned him an Oscar. Today, he lives with his third wife, Susan, in San Francisco and has three children from previous relationships — Zachary, 30, Zelda, 24, and Cody, 21.

"People say, 'Yo, what's it like to have the pressure of this show riding on you?'" Williams says. He has a way of going from silly to serious in the stretch of a sentence. "For me, this work is actually relaxing. We're trying things out and seeing what sticks. That's all we can do. You enjoy yourself and hope it hits."

For more on The Crazy Ones, pick up this week's issue of TV Guide Magazine, on newsstands Thursday, Sept. 5!

Subscribe to TV Guide Magazine now!