If the target creature is an illegal target by the time Turn to Slag tries to resolve, the spell won't resolve. You won't destroy any Equipment.

Artwork
Loading artwork…
Turn to Slag
Core Set 2021 · #168 · EN
Nonfoil—Foil—
Card rules
Turn to Slag deals 5 damage to target creature. Destroy all Equipment attached to that creature.
"If it wasn't a blackened, stinking, melted abomination before, it certainly is now." —Koth of the Hammer
Common · Illustrated by Zoltan Boros & Gabor Szikszai
Format legality
Brawl Legal
Commander Legal
Competitive Brawl Legal
Duel Legal
Gladiator Legal
Historic Legal
Legacy Legal
Modern Legal
Oathbreaker Legal
Pauper Legal
Pauper Commander Legal
Penny Legal
Pioneer Legal
PreDH Legal
Timeless Legal
Vintage Legal
Alchemy Not Legal
Future Not Legal
Old School 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
Turn to Slag can target a creature that has no Equipment attached to it.