LeBron James Illustration by Tom Bachtell

The list of athletes who act is long, the reviews mixed. Kareem stole “Airplane!,” Shaq made “Kazaam,” and, somewhere in between, Michael Jordan, in “Space Jam,” was the best human actor in the scenes he shared with Bugs Bunny. “The challenge is getting them comfortable being silly,” Judd Apatow said the other night at the Beacon Theatre, where he was preparing to do standup with Amy Schumer, the writer and the star of his new movie, “Trainwreck.” Apatow has given cameos to athletes before—several Philadelphia Flyers hit on his wife, Leslie Mann, in “This Is 40”—but “Trainwreck” hands an entire role to LeBron James.

“I wrote LeBron’s name into the script because he was the only basketball player I knew,” Schumer said. “And because I thought it would get Judd to make the movie.”

Schumer may have misjudged her audience. “I have a natural hostility toward athletes,” Apatow said. “When I see a person jogging who’s my age”—forty-seven—“I always think, Fuck that guy.” Apatow, who wore a dark blazer and jeans, surveyed his own athletic career. “I’m one of those ‘picked last in gym class’ guys,” he said. “And, if you’re picked last, you end up in right field—deep right field—and the ball never goes to you to prove you can catch it.” Once, when Apatow was ten, he worked as a ball boy for Martina Navratilova and Renée Richards. “In the middle of the match, I got bored and just walked up to the line judge and said, ‘I gotta go,’ ” he recalled. “I was hungry.”

In “Trainwreck,” Bill Hader plays a sports surgeon. James plays his patient turned best friend and romantic adviser—the Bruno Kirby to Hader’s Billy Crystal. Over lunch in Los Angeles, Apatow pitched James on a “bizarro LeBron” with both fictional characteristics (“He’s really cheap”) and real ones (“He’s really into Cleveland”). James agreed, and joined the production during its final week, just after announcing his return to Ohio. At one point, the producers had to call the police to report that officers who were supposed to be guarding the set were, instead, badgering James for his autograph. “Suddenly, friends you haven’t seen in ten years show up on set,” Apatow said. “There’s a whole run of Chris Rock’s jokes, because he showed up and wanted to introduce his kids to LeBron.”

James had hosted “Saturday Night Live” in 2007—he dunked on Jason Sudeikis—and he adapted quickly to Apatow’s filmmaking style: lob different jokes at the actors and see what sticks. James improvised many of his lines expressing adoration for Cleveland, and when Schumer suggested that he recite several lines from Kanye West’s “Gold Digger,” James delivered them like an open-mike-night veteran.

“I couldn’t do that with my favorite song in the world,” Hader, who was introducing Schumer at the Beacon, said. “Everyone’s supposed to be good at one thing—I can do voices—but LeBron’s instincts were all totally right, and he’s the best basketball player on the planet. So the whole thing’s really shitty for me.” One scene called for Hader to go one-on-one against James. “Bill was very happy, because he thinks in one take he actually made a layup off LeBron,” Apatow said.

“It’s true!” Hader said. “I ruined the take because I started celebrating. I looked right into the camera and said, ‘Oh, shit!’ and did a goofy walk.”

“It’s questionable how much LeBron was playing defense at that moment,” Apatow said.

James appears in half a dozen scenes, but Apatow had hired several other athletes to fill out the roster of Hader’s patients, including Chris Evert. “It’s the summer of Chrissie!” Evert said, noting that she is also set to appear in an HBO mockumentary about a tennis match that lasts for seven days. “They wanted me to say that the lines on the court were made of cocaine. And they wanted—I can’t even say it—they wanted me to say f . . . u . . . c . . . k.” James had been up for every line Apatow suggested, but Evert blanched when she was asked to tell James, “Stop cock-blocking me, LeBron,” an expression that she had to ask her son to explain later. Evert hadn’t yet seen the movie. “It’s not in there, is it?” she asked. It is.

“I guess that’s a childhood fantasy, to get Chris Evert to say something dirty,” Apatow said, backstage at the Beacon. Both James and Evert made their acting débuts as teen-agers—James on an ABC sitcom, Evert in “Burt Bacharach in Shangri-La.” “Every athlete wants to be an actor,” Evert said. “And I think every actor probably wants to be a professional athlete.” Apatow wasn’t sure. “Actors don’t want to exercise that much,” he said. ♦