NEW YORK (CNS) — Grown-ups who yearn to connect with their inner 11-year-old boy are given a two-and-a-half-hour window of opportunity to do so in “Transformers: The Last Knight” (Paramount).

As for the literal preteens who might somehow enjoy this long, loud and dumb production, however, a steady stream of swearing and some muddled supernatural motifs make it inappropriate for them.

The fifth franchise entry for a series based on a line of Hasbro toys, and dating back to 2007’s “Transformers,” director Michael Bay’s ponderous sci-fi action flick, like its immediate predecessor, centers on small-time inventor Cade Yeager (Mark Wahlberg).

Unlike most humans, Cade distinguishes between the good shape-shifting robots of the title, represented most prominently by Optimus Prime (voice of Peter Cullen), and their evil counterparts. For those keeping score, the former group are called Autobots, the latter Decepticons.

This time out, Cade is scrambling to save Earth from being destroyed in a collision with the automatons’ home planet, Cybertron. It seems that Quintessa (Gemma Chan), the evil sorceress who created the Transformers, has a scheme to revive their dying orb by desolating ours. And she manages to coerce Optimus into switching sides and abetting her based on the rather unanswerable argument that she is his “god.”

Along with that little nonscriptural nugget, the sinkhole of a plot drags in prehistory, via a set of Dinobots allied with the Autobots, King Arthur (Liam Garrigan), the biblical apocalypse and Viviane Wembly (Laura Haddock), an English professor in present-day Oxford who becomes Cade’s antipathy-at-first-sight love interest. Sir Edmund Burton (Anthony Hopkins), a loopy historian, explains all these connections in detail but unconvincingly.

As boredom sets in, viewers may take to counting the number of times Cullen pompously intones “I am Optimus Prime …” Once is too often.

The film contains occult themes, much harsh but mostly bloodless combat violence, at least one use of profanity, a few milder oaths and much crude and crass language. The Catholic News Service classification is A-III — adults. The Motion Picture Association of America rating is PG-13 — parents strongly cautioned. Some material may be inappropriate for children under 13.