Williams will appear as himself in the 13th episode of Modern Family's current season, according to The Hollywood Reporter.

'New Year's Eve' will see Jay (Ed O'Neill) face off against Williams in a game of cards while on a family trip to Palm Springs.

In addition to his Star Wars role, Williams has appeared in such films as 1981's Nighthawks and 1989's Batman. The star has focused more on television work in recent years, with guest roles on NCIS and White Collar.

Modern Family continues on Wednesdays at 9/8c on ABC and airs on Fridays at 8pm on Sky1 in the UK.