On Wednesday’s episode of the show’s eleventh and final season, “Legacy,” Phil Dunphy (Ty Burrell) paid a visit to his dad Frank (Fred Willard) after he was found wandering a grocery store alone, prompting Phil to grow concerned that he was suffering from dementia.
He wasn’t, but that did end up being their final day together, with Phil revealing in a confessional that his dad then died of old age.
In a eulogy, Phil told his family, “My dad was okay, and my takeaway from our day was, don’t miss the chance to let the people you appreciate know that.”
On her Instagram Story, Hyland, 29, revealed she found out about Frank’s death at the same time as viewers.
“I don’t read scripts of episodes of Modern Family that I’m not in, so I just found out that my grandpa’s dead along with all of you,” she said on her Instagram Story, according to E! News. “I still feel special.”
“I guess I should’ve put a spoiler alert for Grandpa Frank dying, but I was just caught off-guard,” she continued, joking, “Like, as his granddaughter, you think I’d be invited to his funeral.”
Willard, 80, played Frank for 14 episodes across all 11 seasons. In 2010, the role landed the actor an Emmy nomination for outstanding guest actor in a comedy series.
His character’s death is the second over the last two seasons. In season 10, the show killed off Claire and Mitchell’s mom, DeDe (Shelley Long).
Last week, ABC announced that the series will air its final episode on April 8.
The sitcom, which premiered in 2009, has won five Emmys for outstanding comedy series.
“I will probably miss the people the most,” Hyland previously told PEOPLE. “Our crew is amazing and, of course, I love our cast, they are very special people.”
Modern Family airs Wednesdays (9 p.m. ET) on ABC.