Why that “IF” ending is leaving audiences in a puddle of tears

Star Ryan Reynolds has called the emotional film "a live-action Pixar movie," and he's not wrong.

Warning: This article contains spoilers for IF.

When John Krasinski showed off his new family dramedy IF at CinemaCon in Las Vegas in April, a video preview featured star Ryan Reynolds calling it "a live-action Pixar film." And he was not wrong.

Written, directed, produced, and also starring Krasinski, IF follows Cailey Fleming's Bea, a young girl going through a tough time when she discovers she has a kind of superpower — she can see everyone's IFs, or imaginary friends. As kids grow up, they lose the ability to see their IFs, but Bea's adult neighbor, Cal (Reynolds), still can. Together, Bea and Cal strike up a friendship and go on an adventure together to try and reconnect IFs with their kids.

The IFs, which come in a variety of shapes, sizes, species, and colors, all feel like something conjured up by Pixar, but it's the film's heartfelt emotion, overall message, and gut-wrenching twist that most evoke the poignant animated films of the studio's oeuvre (Inside Out's Bing Bong, anyone?).

Related: Steve Carell and John Krasinski have an Office reunion in new IF promo

Audiences who saw the Paramount film early took to social media to share that they were "sobbing" or "put through the entire emotional spectrum," and that's in large part due to the film's ending. (Look away now to avoid massive spoilers!)

<p>Jonny Cournoyer/ Paramount Pictures</p> Ryan Reynolds and Cailey Fleming star in Paramount Pictures' 'IF.'

Jonny Cournoyer/ Paramount Pictures

Ryan Reynolds and Cailey Fleming star in Paramount Pictures' 'IF.'

Want more movie news? Sign up for Entertainment Weekly's free newsletter to get the latest trailers, celebrity interviews, film reviews, and more.

IF begins with the revelation that Bea's mother died of cancer sometime in the not-so-distant past, and to make matters worse, her father (Krasinski) is currently hospitalized while he undergoes some sort of major heart surgery. This trauma is what leads to her seeing imaginary friends again. Her journey with Cal to reconnect IFs with humans leads to healing and growth (and some very teary reintroductions, especially between Steve Carell's character, Blue, and his now-grown child, Jeremy, played by Bobby Moynihan).

But it's the film's one-two punch of an ending that really brings the waterworks. First, Bea's dad wakes up from a presumed coma after she tearfully tells him the story of her adventures with the IFs — whom she can no longer see by this point — and pleads with him not to leave her alone. Then, after her father has been discharged from the hospital and they're packing their belongings to return home, Bea comes across an old crayon drawing she did when she was younger, which features her and her parents standing next to a clown named Calvin.

Related: With new film IF, John Krasinski uses daughters' imaginary friends to find the inner kid in us all

In this moment, Bea realizes that Cal was Calvin, her very own imaginary friend that she had forgotten, and, like any good IF, he had been helping his child in her time of need — even though she no longer remembered him. She returns to the attic apartment where she thought he had been living and apologizes for forgetting him, an act which conjures him up once more. The two share a hug and are finally reintroduced like Blue and Jeremy were earlier in the film.

<p>ANGELA WEISS/AFP via Getty</p> Steve Carell, John Krasinski, Cailey Fleming, and Ryan Reynolds arrive for the premiere of 'IF'


Steve Carell, John Krasinski, Cailey Fleming, and Ryan Reynolds arrive for the premiere of 'IF'

The film isn't done there, though. One final twist provides a very welcome smile for audiences to walk out of the theater with. Throughout the film, Cal repeatedly trips over the invisible IF, Keith (voiced by none other than Brad Pitt), in something of a running gag (an incredulous Cal at one point utters, "What kind of kid creates an invisible IF?!").

We find out exactly what kind of kid in the movie's final moments. When Krasinski's character and Bea return home, he immediately trips over something. "Oh, hi, Keith," he says without missing a beat, making it clear that he was, in fact, that kid with the invisible IF all along.

Related: Ryan Reynolds says he’s ‘kicking himself’ for not including this real-life imaginary friend in IF

Also starring Fiona Shaw and the voice acting of George ClooneyMatt DamonBradley CooperKeegan-Michael KeyMatthew RhysEmily BluntPhoebe Waller-BridgeLouis Gossett Jr.Blake Lively and more, IF is in theaters now.

Read the original article on Entertainment Weekly.