In the best possible way, June Squibb, Oscar nominee for “Nebraska” and one of the replacement- cast strippers in the 1959 Broadway production of “Gypsy,” has transformed into the Stephen Sondheim lyric written for the stripper she played, Electra, who sang: “I’m electrifying/ And I ain’t even trying.”

Now 94, Squibb takes care of business in “Thelma,” which succeeds, sometimes in spite of itself, for reasons revealed in the first minute of writer- director Josh Margolin’s comedy.

Thelma’s at her computer at home in Los Angeles. She’s looking for a specific email — her late husband singing “Some Enchanted Evening” — among all her unopened emails. By her side, coaching her through the process, is her loving, directionless but big-hearted grandson, Danny (Fred Hechinger, “The White Lotus,” Season 1). It’s a familiar scene of gentle comic frustration, made enjoyable by the affection and light touch of both actors, generations apart but simpatico where it counts. Even in a sitcom, which this is, sort of, it helps to keep the behavior in the realm of real life.

Alone, a few scenes later, Thelma answers a phone call. It’s her grandson, in jail. He needs bail money, and someone’s calling her in a minute to arrange payment. The call comes and Thelma, distraught, agrees to send $10,000 to a post office box nearby in the San Fernando Valley.

The whole thing’s a scam, effective enough to work on Thelma. Concerned, her therapist daughter (Parker Posey) and son-in-law (Clark Gregg) chalk it up to old age, wondering if it’s time for Thelma to transition into assisted living. But she has other plans, and would like her money back. The plans involve a mobility scooter and its owner, both borrowed from a nearby nursing home for a few hours. Richard Roundtree, whose final film this was, plays the owner, Ben, with a just-so air of real enjoyment. The pair set out to confront the scam artists. As they embark on their big day out, “Thelma” uses the casually spoofy trappings of spy and revenge-thriller movies — the most obvious being composer Nick Chuba’s “Mission: Impossible”-inspired score — to nudge the action along.

This could’ve been insufferably cute. But it isn’t. Parts of it are what you’d call sufferably cute, but “Thelma” has a canny sense of timing and comic tone, which accommodates serious matters as they arise. Aging, losing friends and spouses, dreading the next fall or stumble, wondering when it’s time to make a change or consent to some help: These musings are ever- present in Margolin’s film. Squibb and Roundtree elevate every scene they share; Posey, Gregg and Hechinger interact like a quasi-real family, talking and muttering over each other without hammering the rhythms.

This is Margolin’s first directorial feature, and from the looks of it, he has clever instincts on how to finesse his own joke reflex by backing off visually, or cutting away at the right moment rather than overstressing the humor. At one point, Gregg, as son-in-law Alan, obsesses over something to do with databases, about which he has no knowledge beyond his feeling that “you don’t want to end up in one.” Far from home in their two-seat scooter, like city cousins of the Iowa characters in “The Straight Story,” Thelma and Ben speak forthrightly about their time of life.

“I didn’t expect to get so old,” Thelma says. The way Squibb delivers that line, it’s a declaration of fact, no despair, no fuss. You believe her, and in her own way, she is electrifying.

MPA rating: PG-13 (for strong language)

Running time: 1:37

How to watch: In theaters