Paul Rudd made the early voting experience a little more bearable—and much more memorable—for a group of New Yorkers.

On Thursday morning, the 51-year-old Ant-Man star was spotted in Brooklyn handing out cookies to those waiting in long lines to hit the polls. Several Twitter users documented the surprise appearance with photos and videos, showing Rudd outside the Barclays Center distributing the treats one-by-one, and snapping a few selfies with fans. 

"I want to say thank you for coming out and voting and doing your part," Rudd was heard saying through his mask, as he handed out the cookies.

Brian Rosenworcel, the drummer of Guster, was among the voters who saw Rudd at the Barclays Center.

"I was standing in line and I thought Paul was just there to vote, but then he starts handing out cookies to people in line," Rosenworcel told CNN. "And he waited to greet people as they exited to say thanks for voting in the rain."

Rudd, who was joined by filmmaker Andrew Jarecki, told NowThis he was inspired by the record early voting numbers across the country, and said it was important to show these citizens some appreciation.

"It should not be hard to vote. People should be getting the day off from work. Polling places should be everywhere. This should be easy, not difficult, " he told the outlet. "... Anybody who is waiting in line deserves to be thanked and encouraged and recognized."

Jarecki also highlighted his work with the Election Super Center Project, a nonpartisan initiative that has helped turn sports stadiums and arenas into voting sites. The director said it was also important to make the voting process easier and more convenient.

"People are very passionate, and, you know, you can see it because there are lines across the Barclays Center, there are lines across the country," he said. "Personally, I think it's kind of crazy that we spend 10 times as much money on missile programs as we do on letting people vote, which seems pretty important."