If the target creature is an illegal target as Floodpits Drowner's last ability tries to resolve, it won't resolve and none of its effects will happen. Floodpits Drowner won't be shuffled into its owner's library.

Artwork
Loading artwork…
Floodpits Drowner
Duskmourn: House of Horror · #59 · EN
Nonfoil—Foil—
Card rules
Flash
Vigilance
When this creature enters, tap target creature an opponent controls and put a stun counter on it.
1
,
: Shuffle this creature and target creature with a stun counter on it into their owners' libraries.
2/1
Uncommon · Illustrated by John Tedrick
Format legality
Alchemy Legal
Brawl Legal
Commander Legal
Competitive Brawl Legal
Duel Legal
Gladiator Legal
Historic Legal
Legacy Legal
Modern Legal
Oathbreaker Legal
Pioneer Legal
Standard Legal
Standard Brawl Legal
Timeless Legal
Tlr Legal
Vintage Legal
Future Not Legal
Old School Not Legal
Pauper Not Legal
Pauper Commander Not Legal
Penny Not Legal
PreDH Not Legal
Premodern Not Legal
Rulings
Published rulings from the downloaded Scryfall catalog. Source card record · Rules and interactions