Filmmakers have to walk a fine line when depicting science in their movies or TV shows: the concepts must be believable without getting in the way of entertainment. And that's after coming to grips with how real science fits in or contradicts the plot. Many films employ science advisors who try to keep the production from looking insanely ignorant- because whether the writers, producers, and directors know the relevant science or not, many people in the audience will. Theoretical physicist Sean Carroll has worked with Marvel on several of their superhero films.
Much of a science advisor’s work boils down to small changes in the dialogue, but occasionally their input leads to more significant cuts. When working on Thor (2011), Carroll advised against one scene that depicted a character pushing another off a disc-shaped planet. “The problem is there’s no gravitational pull to pull you off the edge of the planet,” he says. “So scientifically that doesn’t quite make sense.” (On a disc-shaped planet, gravity would actually be working to pull you back to the center.)
Read more about the work of Hollywood science advisors at Mental Floss.