Who knew Kylo Ren had a heart of gold?

Ben Affleck was on Jimmy Kimmel Live! on Tuesday, where he told the story of how Adam Driver gave his son Samuel an amazing eighth birthday as his Star Wars character.

Affleck, who's currently filming the movie The Last Duel with Driver, recounted how he almost showed up empty-handed to his son's surprise birthday party — until Driver came to the rescue.

The actor had been in Europe filming a movie and worked right up until the big day. He flew from London to Los Angeles, then went to his house to pick up the gifts that were supposed to be shipped. When he arrived, someone he worked with gave him the bad news.

"I get to my house. I said, 'Where are the presents?' And he said, 'They didn’t get here,'" Affleck told Kimmel. "So I had to show up to my son’s party with no gift. It was this sort of sinking, awful feeling."

Don't worry, the story gets better.

"And then he goes, 'But, there is some news — Adam heard you say it was your son’s birthday, and so he called your assistant and got your address, and sent some presents and signed a card and a picture from Kylo Ren,'" Affleck said to gasps from the audience.

Earlier in the interview, Affleck talked about why Driver's gesture was extra special.

- Rodin Eckenroth/FilmMagic; David James/u00A9Lucasfilm 2015 Rodin Eckenroth/FilmMagic; David James/u00A9Lucasfilm 2015

“My son knows that I do movies — they’re kinda fake — that his mom's [Jennifer Garner] in movies and that's all pretend," he said. "But he also knows that Star Wars is real. So I told him, 'I’m actually in this movie with Kylo Ren' and his mind opened in two," he explained. "He was like, 'But dad! How? How do you know Kylo? Are you going to space?'”

Knowing his son was a fanatic, Affleck had asked Driver to tape a video prior to his son's birthday. What he didn't know, however, was just how much effort his costar would put into the gesture.

Fast forward to the party, when the special moment unfolded.

"I watched him open up all the presents. And I said, 'My presents didn’t get here on time,'" Affleck recalled. "'But I did get a present from somebody who really wanted to make sure you got a gift.' And he goes, 'Who?' And I said, 'Kylo Ren.'”

Thus, Affleck's son got to live out every eight-year-old's dream.

"He opens the presents, I played him the video of Kylo Ren, and it was an incredibly moving and powerful moment. Adam made me a hero to my kids," Affleck said, adding that the story was a good lesson about the power of small gestures.

In summation, Kylo Ren has killed people and stuff, but he did save a child's birthday party .... so let's call it even.

Affleck is starring as a high-school basketball coach in the sports drama The Way Back, which will premiere March 6.

Related content: