There’s an irony that comedian and actress Cristela Alonzo is playing an automobile in “Cars 3,” yet professes she shouldn’t be let behind the wheel.

“Honestly, this movie has taught me how little I know about cars,” she says. “I thought I was OK and it turns out that I shouldn’t be allowed to drive. ... I shouldn’t be allowed to even be a passenger in the car.”

Thankfully, her role was animated, and didn’t actually require any prowess in the driver’s seat.

Alonzo plays Cruz Ramirez, a spunky, yellow sports car who is brought in to train Lightning McQueen (voiced by Owen Wilson) for an upcoming race. And, it turns out, she’s got some serious racing skills of her own.

Alonzo says that her character’s story was drawn from her own life after she met Pixar head honcho John Lasseter (who directed the first two “Cars” movies).

“I met John Lasseter half way through the production,” Alonzo explains. “I started talking about my childhood and how hard it was to be the underdog. He found that it resonated with him, and thought it would be relatable to people. So thematically they got a lot of the aspects of my life and put them into Cruz.”

She says that Cruz’s strong, self-assured persona comes from her.

But that’s not all: Alonzo also got to bring in some of her own dialogue, riffing in the recording booth.

“You know, that’s actually what I really liked about this character,” the 38-year-old says. “Once they realized that bringing in part of me into this character was important to them, I was actually allowed to really collaborate on the role.

“Pixar was really good at letting me freestyle whatever I wanted,” Alonzo continues, “and certain lines of dialogue that I came up with made it to the film just because it was more authentic to the character.”

Cruz’s storyline begins with her as Lightning’s trainer, but as the film moves along, she becomes an empowered character that gets to follow her dreams. Alonzo says it’s a story that helps teach a lesson.

“A lot of times we do a great job of separating groups with gender,” she says. “It’s always a boy thing, a girl thing. Boy toys, girls’ toys. And I think this is a great story that reminds you that really, if you want something, if you have a dream, a dream shouldn’t be about being a boy or girl. It’s about who’s the best at it. Who’s putting in the better effort. Who’s worked the hardest.”