Tammy” laughed its way to $1.3 million at the Tuesday night box office.

New Line, the studio behind the R-rated comedy, is betting that Melissa McCarthy’s star power can outshine the battling robots from “Transformers: Age of Extinction” at the Fourth of July box office.

The raunchy vehicle got off to a strong start, with its late night debut comparing favorably to two recent McCarthy ventures, “The Heat” ($1 million) and “Identity Thief” ($450,000).

“Tammy” co-stars Susan Sarandon,Toni Collette and Kathy Bates and centers on a fast food worker who quits her job and embarks on a road trip with her alcoholic grandmother. It’s a passion project for McCarthy who co-wrote the story along with her director (and husband) Ben Falcone. Analysts expect the film will do north of $40 million in more than 3,300 locations over its first five days of release.

The picture is a low-risk, high-reward proposition for New Line. It only cost $20 million to produce, with McCarthy exchanging a lower up-front salary for a piece of the back-end.

Reviews for the picture have been dreary (Variety’s Justin Chang called it a “middling misfire“), but they were of the scorched earth variety for “Identity Thief,” and McCarthy’s name above the title still made that a hit.

The bigger issue for “Tammy” and any other film opening up in the Independence Day corridor is that the Fourth falls on a Friday, which should limit mid-week business. There’s also the impending arrival of Tropical Storm Arthur, which is expected to make landfall in time for the fireworks.