Hannigan's daughter was originally supposed to play her character's daughter.

hospital baby himym

She looked too old for the role. 20th Century Fox

When Lily did end up having a child on the show, Hannigan's young daughter was set to play the role. But, according to what the actor told the HuffPost, she wasn't young enough. "They fired my kid from that role. She was gonna be the baby, but Carter Bays was like, 'Nope. She’s too old,' and she got replaced," Hannigan said.