Social Media Explodes as Jennifer Lopez Returns to 'Will & Grace'

The singer and actress made a brief, but hilarious cameo on the NBC sitcom, criticizing Jack's acting after he books a "lifeless" role on her NBC series, Shades of Blue.

On the set, Lopez is seen in her signature look of Shades of Blue's Harlee Santos, shooting a scene where she shows a woman the dead body of her son.

A morgue attendant slowly reveals Jack (Sean Hayes) as the lifeless body, but he interrupts the scene to reconnect with his old friend.

'Do you remember me?" he says.

Exasperated, Lopez talks to unseen producers, "Why is the corpse talking? Whoever you are, you're a corpse so you shouldn't be talking."

They go back to filming and Jack continues to talk, trying to get Lopez to remember who he is, and in one instance he tries to use a selfie stick to take a photo of himself and Lopez in the middle of the scene.

Later, they show another body and it's Lopez herself acting like a dead body.

The "Dance Again" singer previously appeared in three episodes of Will and Grace's original run as herself. She was in the final two episodes of the sixth season, when Karen (Megan Mullally) married Lyle Finster (John Cleese.)

Lopez had grown up with Karen's maid, Rosario (Shelley Morrison) back in the Bronx. At the wedding, she ended up singing "Waiting for Tonight," giving Jack (Sean Hayes) a chance to fill in for one of her back-up dancers.

Lopez came back for the season 7 premiere. Her performance on the sitcom was positively received, filled with self-deprecating gags and tricky comedic timing.