MYRTLE BEACH, SC (WBTW, CNN) — Tom Hanks is playing the iconic role of “Mister Rogers” in the new film “A Beautiful Day in the Neighborhood.” Turns out, Hanks and Rogers are related.

Tom Hanks found out while on the red carpet during a special screen for the film this past weekend. Fred Rogers played the role of Mister Rogers on the Children’s TV show, “Mister Rogers’ Neighborhood.” The two are sixth cousins, according to Ancestry.com.

Hanks says he did not know they were related when he took the role. According to Ancestry.com, the actors share a great, great, great, great, great grandfather who immigrated from Germany to the United States in the 18th century.

“It’s a Beautiful Day in the Neighborhood” makes an official debut in theaters on Nov. 22.