Sorin's Vengeance deals 10 damage to target player or planeswalker and you gain 10 life.
If the player is an illegal target when Sorin’s Vengeance tries to resolve, Sorin’s Vengeance won’t resolve and none of its effects will happen. You won’t gain life.