If the target creature or planeswalker is an illegal target by the time Vraska’s Contempt resolves, the entire spell doesn’t resolve. You won’t gain life.

Artwork
Loading artwork…
Vraska's Contempt
Ixalan · #129 · EN
Nonfoil—Foil—
Card rules
Exile target creature or planeswalker. You gain 2 life.
It wasn't long before the taverns of High and Dry were full of whispers about the new captain who could turn a person to stone with a glance.
Rare · Illustrated by Clint Cearley
Format legality
Brawl Legal
Commander Legal
Competitive Brawl Legal
Duel Legal
Gladiator Legal
Historic Legal
Legacy Legal
Modern Legal
Oathbreaker Legal
Penny Legal
Pioneer Legal
Timeless Legal
Vintage Legal
Alchemy Not Legal
Future Not Legal
Old School Not Legal
Pauper Not Legal
Pauper Commander Not Legal
PreDH Not Legal
Premodern Not Legal
Standard Not Legal
Standard Brawl Not Legal
Tlr Not Legal
Rulings
Published rulings from the downloaded Scryfall catalog. Source card record · Rules and interactions
There are many important moments in the story, but the most crucial—called “story spotlights”—are shown on cards. These cards have the Planeswalker symbol in their text box; this symbol has no effect on gameplay. You can read more about these events in the official Magic fiction at http://www.mtgstory.com.