"It wasn't in the script actually, so we never rehearsed it or anything," Tarantino said during a recent panel for his hit film.

As aging TV star Rick Dalton, one of Leonardo DiCaprio’s most iconic scenes in “Once Upon a Time in Hollywood” comes during a private moment in his trailer following an unsuccessful shoot on the set of “Lancer,” the popular television series he’s guest starring on as his career skids into slow decline. But it turns out this freakout scene, which involves DiCaprio throwing things and angrily reflecting on how his heavy drinking led to him forgetting his lines, didn’t appear in Quentin Tarantino’s original script. In fact, DiCaprio himself came up with the seed for the freakout, the director revealed during a post-screening Q&A at his New Beverly Cinema over the weekend.

“It wasn’t in the script actually, so we never rehearsed it or anything,” Tarantino said. “Leo had a whole thing. At some point it was like, ‘Look, I need I need to fuck up during the “Lancer” sequence, all right? And when I fuck up during the “Lancer” sequence, I need to have a real crisis of conscience about it and that I have to come back from that.'”

Tarantino shot two versions: one with DiCaprio landing his lines as the TV western villain and another as it actually appears in the film — with DiCaprio repeatedly forgetting his lines, which had practiced the night before while drinking several whiskey sours. Tarantino came up with the idea for the in-trailer subsequent freakout, taking inspiration from Robert De Niro’s iconic performance in “Taxi Driver.” “I think I described it exactly this way, I think we shot it exactly this way — It’s gotta be like Travis Bickle when he’s in his apartment by himself,” Tarantino said.

To DiCaprio, Tarantino gave a list of things Rick could be freaking out about, including “Lancer” star Jim Stacy and precocious young costar played by Julia Butters. Tarantino said DiCaprio was nervous about the improv. “I’ve never seen him so nervous as on the day, we’re going to do the scene in three hours,” Tarantino said.

DiCaprio says he did draw on personal experience as an actor who has at points had bad days. “I’ve definitely had days like that,” he said. “I don’t think I’ve ever flipped out quite like that.”

While DiCaprio’s Rick has a plethora of lines both in his personal life and acting in movies within the movie, Margot Robbie as Sharon Tate has very few. But it’s Robbie’s non-verbal performance that makes her such a commanding presence on screen. “I don’t think I’ve ever felt so transported as I did on Quentin’s set because number one, everything’s practical. There’s not just the foreground of props and setting and then the rest is going to be blue screen, green screen, we’ll do it later. It’s all 1969 around you. And as far as you can see down the street, there’s a row of cars from the 60s,” she said.

But just being surrounded by period sets wasn’t enough for Robbie, who said she had to work hard to capture Tate’s lightness. It’s easier to “go dark,” she said.

“I worked with a movement coach, I would run around and pretend to be a cloud and all that kind of stuff,” she said. “I made a list of all the things that make me really happy and then I would try and do all those things on the day that I was going to work or the day before. All the things that gave me any of that downward pull in life, any of this stress and angst, I would kind of cut that out. Like I can’t look at emails within 24 hours of going to set.”

Sign Up: Stay on top of the latest breaking film and TV news! Sign up for our Email Newsletters here.