The toys in “Toy Story 4” are freaking out in Bonnie’s family RV when Rex spirals into his typical hysterics.
Panicked, the dinosaur swings his oversize green tail and whacks fellow franchise veteran Mr. Potato Head in the process.
“Hey, watch it, buddy!” the spud cries out, as his detachable pieces fall to his feet.
The scene features Don Rickles’ return to the big screen, two years after his death in April 2017 at age 90.
The Emmy-winning actor and comedian continued to headline lounges and concert halls well into his 80s, and before his death, Rickles agreed to join the fourth iteration of the 24-year-old franchise, which opens in theaters Friday.
The “Toy Story” team asked Rickles’ family if they wanted him to be included posthumously.
It was a no-brainer, daughter Mindy Rickles said at the world premiere in Hollywood this month.
“He always said, ‘Keep my name alive. Let them know who I am.’ So he would be thrilled by all of this, definitely,” she said on the red carpet.
“Toy Story 4” director Josh Cooley was overjoyed. “I can only see Mr. Potato Head as Don Rickles doing that voice. I can’t imagine anyone else.”
It was a painstaking process to include archival sound of Rickles’ voice.
Bit by bit, an editorial team mined more than two decades’ worth of Rickles’ voice sessions and outtakes recorded for movies, shorts, theme parks, toys and other projects.
They “logged every word, every cough, every hum, just so we’d know what we had,” Cooley recalled.
The 39-year-old director collaborated with screenwriters Andrew Stanton and Stephany Folsom to write general lines for Mr. Potato Head, and then they searched the archival database for the best fit.
Some resurrected quotes that made the cut include, “You got to be kidding me” and “I knew it” (both phrases uttered in frustration at Woody, played by Tom Hanks).
Annie Potts, returning as the voice of Bo Peep following 1995’s “Toy Story” and “Toy Story 2” in 1999, was surprised to hear that the animators had found a way to include Rickles in the fourth film.
“I was like, ‘Wow, that is so fantastic,’ and then I thought, ‘Oh, my God, they’re going to probably pull my stuff too,’ ” Potts said.
“It’s a funny thing when we think about it. AI can replace actors entirely. That would be super distressing.
“But how wonderful that, in this movie, he can come back and enjoy this delightful movie and not be missed. As far as I’m concerned, it’s all a positive.”
For Wallace Shawn, the voice of Rex, the decision seemed a bit strange.
“If it were me, if life after death turned out to be true, and I would be able to observe them doing that to me, I think I’d find it a little odd,” he said.
Cooley laughed when he heard Shawn’s reaction: “It doesn’t surprise me that he said that. He’s so funny and so interesting.
“I totally understand what he’s saying. That’s why with Rickles, it’s the ideal situation that he agreed and the family agreed.”
Other late “Toy Story” stars have either been replaced or do not return in the new film.
Cooley still fondly remembers hanging out in Luckey’s office while working on 2004’s “The Incredibles” and 2006’s “Cars.”
Luckey also worked on “Sesame Street” and other projects that Cooley grew up watching, “which was always a trip to talk about.”
With Jim Varney, the original Slinky dog, who died in 2000, his pal Blake Clark stepped in to fill his shoes in “Toy Story 3” and “Toy Story 4.”
Clark repeatedly yelled two lines from a Varney stand-up routine to get into character: “What time is it?” “Are you cooking beans?” It happened so often that Cooley and his editor would say the same phrases as they passed each other in the hallways at Pixar.
“All I’m trying to do is channel my best friend,” Clark told Cooley once before a recording.
As for the director, he’s also trying to honor the greats in the best way he can.
“All I can say is that it’s just a huge honor.”