If the permanent or player is an illegal target when the ability tries to resolve, it won't resolve and none of its effects will happen. No Squirrel will be created.
22-09-2011
wotc
If the ability resolves, but the damage is prevented or redirected, the targeted player or the controller of the targeted creature puts the Squirrel token onto the battlefield, regardless of how much damage was dealt or what the damage was ultimately dealt to.
Random a card of Magic: The Gathering (MTG), but you can also roll the D20 dice, random a Planeswalker, have fun with the random rules and more.