TAMPA (WFLA/CNN) – Talk about getting into character!

Actor Tom Hanks just found out Sunday that he’s related to Fred Rogers, who played Mister Rogers on the children’s TV show.

Ancestry.com discovered the two are sixth cousins and Hanks is playing Mr. Rogers in the upcoming film “A Beautiful Day in the Neighborhood.” Hanks says he didn’t know they were related when he took the role.

The actors share a fifth great grandfather who immigrated from Germany to America in the 18th century.

Many fans have said Hanks makes a perfect Mister Rogers, and perhaps this is why.

The film premieres on Nov. 22.