There are so many plot threads going in “How to Be a Latin Lover” (Pantelion), they never quite come together. Rather, the film becomes a scattershot comedy wavering uncertainly between warm family fare and a sex farce.

The uneven tone, together with long stretches of exposition that wind up being deadly dull for the audience, make the movie a difficult slog, even though it’s weighted toward a moral lesson about the value of work for its protagonist.

Maximo (Eugenio Derbez) decided in childhood, after the death of his hardworking father, that the easiest way to financial security would be to find a rich lady to take care of him. This he has achieved through his 25-year marriage to the elderly Peggy (Renee Taylor), who indulges his every materialistic whim — so much so that his only means of mobility around her vast estate consists of hoverboards.

This inverted Chaplinesque arrangement ends abruptly when Peggy has an affair and decides the union is over. Maximo, penniless because of a prenuptial agreement, moves in with his estranged sister, Sara (Salma Hayek), an industrious widow with a 10-year-old son, Hugo (Raphael Alejandro).

This is where the pathos and life lessons are presumably supposed to begin, as Maximo, now flabby and graying, tries to figure out how to get a job — any kind of a job — and from there, learns the value of having strong family ties as well as a moral core.

Instead, director Ken Marino and screenwriters Chris Spain and Jon Zack chart a zigzagging course between crass gags, as Maximo instructs Hugo on how to land Arden (McKenna Grace), the girl he has had his very shy eye on, and Maximo’s instruction and inner change as he learns how fundamentally decent Sara and Hugo can be.

He has not given up his gigolo ways, however. His main goal with his newfound work, even on a tiny income, is to gain the attention of, and ultimately wed, Celeste (Raquel Welch), an even wealthier heiress who just happens to be Arden’s grandmother.

Celeste has two prosthetic arms, a fact which is perhaps supposed to be symbolic but, in the end, only becomes the source for a tasteless sight gag.

This formula demands, and gets, a happy ending for all. Yet the plot’s many fits and starts make the journey to the contented wrap-up torturous.

The film contains brief sensuality and fleeting 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.