You don’t flip the coin until the ability resolves. If you want to respond to the ability, perhaps by regenerating the damaged creature, you’ll have to do so before you know the outcome of the flip.

Artwork
Loading artwork…
Creepy Doll
Innistrad · #220 · EN
Nonfoil—Foil—
Card rules
Indestructible
Whenever this creature deals combat damage to a creature, flip a coin. If you win the flip, destroy that creature.
1/1
A child's porcelain doll went missing one night, as did a pair of kitchen shears and the town magistrate.
Rare · Illustrated by Matt Stewart
Format legality
Commander Legal
Duel Legal
Legacy Legal
Modern Legal
Oathbreaker Legal
Penny Legal
Vintage Legal
Alchemy Not Legal
Brawl Not Legal
Competitive Brawl Not Legal
Future Not Legal
Gladiator Not Legal
Historic Not Legal
Old School Not Legal
Pauper Not Legal
Pauper Commander Not Legal
Pioneer Not Legal
PreDH Not Legal
Premodern Not Legal
Standard Not Legal
Standard Brawl Not Legal
Timeless Not Legal
Tlr Not Legal
Rulings
Published rulings from the downloaded Scryfall catalog. Source card record · Rules and interactions
If the combat damage Creepy Doll deals to a creature is lethal, you’ll still flip a coin. If the creature is still on the battlefield (perhaps because it regenerated), it could be destroyed a second time, depending on the coin flip.