Schmaltz is just fine. Melodrama gets a bad reputation among “serious” cinephiles, but a good melodrama can have just as much artistic validity as the most realistic methods of performance. So let’s be clear on this point: Gifted is not a bad movie because it’s melodramatic. In fact, the exaggerated nature of its characters living through a supposedly realistic circumstance makes for a naturally relatable narrative that skirts the edge of actually being good based on charisma alone. But much less forgivable than melodrama is stupidity, and Gifted eventually reveals itself to have that in spades.

That’s actually a little bit ironic considering that the entire plot revolves around a crisis of intelligence. Frank (Chris Evans, pulling off a more tortured version of the Captain America good-guy shtick) is the uncle of an extremely intellectually talented seven-year-old named Mary (McKenna Grace, simply precious), whom he raises on his own after his similarly gifted sister committed suicide while Mary was an infant. When Frank refuses to place Mary in an advanced school because he fears it will stunt her social development, his mother Evelyn (Lindsay Duncan) appears to claim custody of Mary so that she may live vicariously through Mary’s genius. So ensues a custody battle that pits Mary’s potential academic contributions against her developing empathy.

Despite setting up a false dichotomy between intellectualism and relatability, Gifted deserves credit for at least claiming that the issue is not that smart people are self-superior, but that they are conditioned to think that way by institutions that isolate them from their humanity in order to foster their talents. But that’s all subtext that never gets fully explored. The meat of the film is in watching Evans and Grace pal around, and as far as charismatic acting is concerned, yeah, these two deliver the goods. They’re funny, sweet, and just sarcastic enough that their love for one other won’t make you want to puke. Duncan’s turn as Evelyn also adds a complex antagonism that doesn’t quite devolve into cartoon villainy and remains remarkably empathetic throughout.

That is, until the film does turn Evelyn into a cartoon villain in one of the dumbest third acts I’ve seen relative to what came before. This film would have been a soft recommendation based on the charismatic performances alone, in spite of some predictable writing and formulaic turns, but what absolutely kills it is how utterly irrational and conveniently every character acts during the film’s final half hour. For being a film that is so obsessed with determining what is best for a child, Gifted so blatantly throws that away for the sake of a contrived plot twist that it loses all credibility and simply becomes frustrating.

There’s a lot of talent on display here. The performances are all great, the cinematography captures the warm sunny glow of the American South, and director Marc Webb has a firm enough handle on the level of material he’s working with to not oversell it. But a film can rise or fall entirely on its screenplay, and in portraying the struggles of smart people, Gifted comes across as very, very dumb.