jennifer lopez ben affleck main

Jennifer Lopez and Ben Affleck are doing their best when it comes to their kids … TMZ has learned they walked into a school together despite their divorce in full swing.

Sources with direct knowledge tell TMZ … the exes were seen making their way to the back-to-school night Tuesday at an L.A. area school where they each have kids that attend. Our sources tell us the exes were totally cool with each other and very cordial.

091924 ben affleck jennifer lopez with kids beverly hills hotel
Backgrid

But don’t get it twisted — our sources are adamant they’re not rekindling anything — they’re still getting divorced.

We’re told they’re a couple who still care for each other … they’re wrapped up in a years-long love affair.

jennifer lopez ben affleck beverly hills hotel backgrid
Backgrid

But their kids are the real focus. Just last week, the two, along with their respective children, were spotted at The Beverly Hills Hotel, where witnesses saw them kissing and holding hands during the lunch.

We broke the story — Jen pulled the plug on the marriage last month.

Ben Affleck and Jennifer Lopez Together -- Bennifer Through The Years!

Happier TimesLaunch Gallery

Getty
We’re glad to see they’re back on speaking terms, which is a step up from last month when our sources said they weren’t talking at all.