Leah Remini recalls slapping her friend Jennifer Lopez onscreen

When you've known someone for a long time, it's easy to fall into old habits -- even when those old habits involve a little roughhousing.

Leah Remini sat down on Ellen to talk about her new movie, Second Act, with Jennifer Lopez, where the real-life longtime pals play besties onscreen.

"Sometimes working with friends is not always easy. And sometimes when you have chemistry, like with your significant other, it doesn't mean you will have chemistry onscreen," Remini explained. "So I was really, really happy when we did our first day of shooting and it was just very easy, it felt like Leah and Jennifer."

In the movie, Lopez plays Maya, an ambitious employee at a big-box store who's frustrated that she can't move up in the company without a college degree, and Remini plays her encouraging best friend, just like in real life.

"I just said, I'm going to do some stuff to Jennifer that I do in real life to her," the 48-year-old said of their scenes together. "Like I do that who's the champ thing to her. Before the AMAs, I'm like, who's the champ? And she's like, I'm the champ."

But Remini admits she doesn't really need to pump up her pal's ego.

"I do it anyway even though she doesn't like it," she added.

Then Remini started to add in the slap -- but Lopez held her own and ended up making her laugh!

"And then I started to slap her, and she cracked me right across the face at the end, and you'll see as she's walking away, I start to smile. I started to smile right there because I fell to the ground in laughter and ruined the tape because she cracked me so hard," Remini said with a laugh.

Remini added, "I did that a lot in the movie, I ruined a lot of tapes."

Second Act arrives in theaters on Nov 21.