LOS ANGELES — The surprise box office success of the uplifting Jackie Robinson biographical film “42” suggests that audiences are ready for a PG-13-rated movie filled with coarse, racially charged language. It also raises questions about whether children should see it, and at what age.


In the picture, which grossed $27.5 million over the weekend, a variety of slurs are directed at the ballplayer, the first African-American major leaguer, who began playing for the Brooklyn Dodgers in 1947. Most pointedly, he is called the N-word many times.


In one particularly graphic scene, Robinson, played by Chadwick Boseman, steps up to bat and is ridiculed mercilessly by the opposing team’s manager, the Philadelphia Phillies’ Ben Chapman, played by Alan Tudyk. The relentless mockery is fueled by the repetition of the slur dozens of times. “That was the assault on (Robinson) and I thought we had to show it in a violent way,” said the film’s writer-director, Brian Helgeland, whose screenwriting credits include “L.A. Confidential.” “Those words had to be violent. If we trivialized it, some people might say, ‘Oh, he didn’t have it so bad.’”


Tudyk knew what he was getting into from the moment he read the script, which he said “shocked” him. When the character actor, best known for his comic roles, began rehearsing his scenes opposite Boseman, his cheeks would flush and his eyes would water when he uttered the racial slurs. He curbed that by watching amateur fights on YouTube, which upped his tolerance to violence but gave him an awful stomachache. “I wouldn’t flush. I wouldn’t get tears in my eyes,” Tudyk said. “I just had a ball of hate in my stomach and I was in a terrible mood – both during the shoot and for days after.”


In addition to the Chapman sequence, the racial slur is used 16 other times in the film, by the Los Angeles Times’ count. There are also other epithets, including some directed at Jewish and Italian baseball players.


Robinson perseveres, and his triumph is presented by Helgeland as an inspiration. But parents keen on showing their children the story of an iconic sports hero face a question: What’s age-appropriate, and how much can they handle?


Dr. Alvin F. Poussaint, a professor of psychiatry at Harvard who advocates for responsible media programming, says that by age 10 most American children have heard much of the name-calling that goes on between races. Parents can use the film as an opportunity for a broader discussion about all kinds of racism.


“Generally by age 10, they understand all that. I think they begin to understand where it fits and they see kids calling each other all kind of names,” he said. “And that’s the context that parents should put it in. It’s not just blacks that get called racial slurs. It’s Latinos, it’s Jews, it’s Italians, it’s everybody.”


The film, produced by Legendary Pictures and distributed by Warner Bros., was given a PG-13 rating for “thematic elements including language” from the Motion Picture Assn. of America. Helgeland expected an R. “If we had come back an R, then we were an R,” Helgeland said. “We weren’t going to try to soft-pedal it.”


The use of the N-word in cinema has been a contentious issue in recent months. Last year’s “Django Unchained” used the word many times, drawing the ire of some. The fictional account of a former slave who seeks to free his enslaved wife from a cruel plantation owner, “Django” was rated R for graphic violence, language and nudity.


According to an MPAA spokesman, the organization does not have a specific rule on the use of the N-word; instead its usage is considered within the context of each film that the MPAA Ratings Board reviews.


Helgeland said that while the Chapman sequence was being edited, “Someone said it made them feel uncomfortable” and recommended that the filmmaker trim down the use of the racial slur. “My reaction was that it made Jackie Robinson feel uncomfortable too,” Helgeland added.


Poussaint said that some African-American parents who know their children are accustomed to hearing the N-word could choose to show their kids “42” to “have them see what a vicious word it is, and how it was used against someone who could have been their grandfather.”


Parent Angie Platt agrees. The Los Angeles resident hasn’t yet taken her 9-year-old son Jonathan to the film, but she intends for him to see it. She also says that he listens to hip-hop often and understands the significance of the N-word.


“I would be doing a disservice as a mother of a black child to not have him know what that word is and to not know what it used to mean and how popular culture uses it today,” Platt said. “I would be raising him in a complete bubble.”


For L.A. resident Glenn Shubb, the film offered him and his wife, Laura, a chance to discuss racism with their two children, who love baseball.


“I think the thing that impacted them most was seeing the segregated entrances into the ballpark,” said Shubb. “Seeing something depicted on film is quite different than learning it in school.”


Shubb said the racial slurs didn’t seem to affect his children as much as it did him. Yet Robinson’s heroism did resonate.


The next day at baseball practice, Jackson, 7, picked up some dirt and rubbed it on his hands, like Boseman’s Jackie Robinson does in the movie, before he stepped up to bat.