If the target creature is an illegal target by the time Temporal Machinations tries to resolve, the spell doesn’t resolve. You won’t draw a card.

Artwork
Loading artwork…
Temporal Machinations
Dominaria · #271 · EN
Nonfoil—Foil—
Card rules
Return target creature to its owner's hand. If you control an artifact, draw a card.
The Cabal soldier blinked and found day had become night, he had a face full of thistle seeds, and the old man was nowhere to be seen.
Common · Illustrated by Zack Stella
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
Pioneer Legal
Timeless Legal
Tlr Legal
Vintage Legal
Alchemy Not Legal
Future Not Legal
Old School Not Legal
Penny Not Legal
PreDH Not Legal
Premodern Not Legal
Standard Not Legal
Standard Brawl Not Legal
Rulings
Published rulings from the downloaded Scryfall catalog. Source card record · Rules and interactions
Whether you control an artifact is checked only after returning the target creature to its owner’s hand. If the target creature is the only artifact you control, you won’t draw a card.