Getting robbed at gunpoint can be a traumatizing thing, though “Roofman” subject Jeffrey Manchester’s victims describe him as unusually conscientious. Breaking into McDonald’s restaurants to steal the loot, he’d lock the employees up in the cooler, but not before making sure they were wearing enough layers to keep warm. If not, he might even give them the coat off his back. As played by Channing Tatum, with maximum charm, the criminal finds a roundabout way to your heart: through the roof.

Director Derek Cianfrance’s “Roofman” takes its title from the news media, which nicknamed Manchester according to his uncommon MO: Where other burglars might go through the back door or one of the windows, this guy would knock a hole in the roof and lower himself down, wait till morning and then force the manager to empty the registers — politely, of course. He knocked over 45 McDonald’s (or comparable targets) before getting caught, although “Roofman” re-creates only the last of those.

The movie primarily focuses on what comes next, after Jeffrey went to jail, finagled his way out and took up residence in the overlooked corners of a Toys R Us store in Charlotte, North Carolina. Jeffrey eventually became romantically involved with a local woman, Leigh Wainscott (Kirsten Dunst), who’s shown here working at the same toy store. That’s an odd change by Cianfrance and co-writer Kirt Gunn, since it makes both characters a lot dimmer than they were. Then again, one of the key takeaways of “Roofman” is that Manchester was brilliant in some ways and not so bright in others.

He wasn’t exactly Robin Hood, but “Roofman” belongs to that grand American tradition, dating back at least to “Bonnie and Clyde,” of asking audiences to root for the “bad guys.” And why wouldn’t we, when the movie treats Manchester as a model dad in all respects but the law-breaking one? That string of McDonald’s heists was motivated by a desire to provide for his family, although it’s a good thing the 70 million or so other fathers in this country don’t go about it the same way.

Fifteen years ago, Cianfrance established his artistic reputation directing Ryan Gosling in the films “Blue Valentine” and “The Place Beyond the Pines,” gritty-but-grand depictions of doomed romance and dashed ambitions. Those themes remain, but in Tatum, he has another movie-star avatar to pin those dreams to. The pair seem to get one another, the way Don Siegel and Clint Eastwood did, or Stuart Rosenberg and Paul Newman, and we can hope that “Roofman” (which could be the duo’s “Cool Hand Luke”) is the first, instead of the only, time they work together.

There’s a tendency in Hollywood movies about slippery crooks and con men to treat the spree as one big laugh (I’m thinking of such recent examples as “The Old Man and the Gun” and “I Love You Phillip Morris,” even though Cianfrance channels more of a ’70s feel). While “Roofman” is entertaining enough, neither the director nor his star sees Manchester’s story as a joke. If anything, it’s a low-key tragedy, in which this damaged U.S. Army veteran (discharged before the film begins) loses one family and seems well on his way to starting over, but sabotages his chances by falling back into old patterns.

The script supplies an entire character, Jeffrey’s less-than-legal Army buddy Steve (LaKeith Stanfield), to observe, “You’ve got like the calculation down, but you’re just goofy,” by which he means inconsistent, though “goofy” is a good word for it. Tatum, who endearingly played a bona fide idiot in “21 Jump Street,” interprets Jeffrey as paradoxically intelligent and impulsive, a near-cartoonish combo that recalls Nicolas Cage’s turn in “Raising Arizona.”
The way Jeffrey turns that Toys R Us into his personal domain — the dream of any kid who grew up singing, “I don’t want to grow up” — is never once presented as pathetic, though it might sound that way on paper.

Meanwhile, production designer Inbal Weinberg deserves extra credit for re-creating that vintage Toys R Us store. (The real one was adjacent to a Circuit City and wouldn’t have featured nearly so many Tickle Me Elmo dolls.) For nearly six months, Jeffrey survived on junk food and candy and if the movie is to be believed, danced around in his undies and Heelys — those roller-skate tennis shoes from the early 2000s — and sometimes less, since the “Magic Mike” star knows his audience and gives them what that franchise never could, stopping just shy of the full monty.

Cianfrance supplies a real jerk of a manager in Peter Dinklage’s Mitch, on whom Jeffrey spies by setting up baby monitors in the back office. Mitch mistreats a young employee named Otis (Emory Cohen) and shows no generosity toward Leigh (Dunst), which in movie morality means he deserves what’s coming to him. By contrast, Jeffrey goes out of his way to help the employees, breaking into Mitch’s computer to change their timesheets and stealing a trash bag full of goodies to donate to the toy drive at Leigh’s church.

Surely Leigh would have put things together, if Jeffrey lavished her two girls with gifts from the same place that she worked (if she wanted them to have all those toys, she could’ve used her employee discount). At the rate things go missing around the store, there’s a good chance her boss might have started to make things difficult for her and the other employees. One could poke holes or just roll with it, as Cianfrance and Tatum put their heads together to supply half a dozen unforgettable set-pieces, from Jeffrey’s laid-back prison break to the scene where he buys Leigh’s eldest daughter (Lily Collias) a beater and pushes it to the limit.

In the end, it’s the through-the-roof chemistry between the two leads that makes the film worthy of repeat viewing. Tatum is no longer the cocky teenager he was in the “Step Up” movies all those years ago, as the star’s affected swagger has eased into a natural confidence, while Dunst brings just the right amount of wariness to a woman who’s devoted to her kids and devout in her faith. While she plays Leigh as closed off to love, leave it to Tatum to find that unconventional point of entry.