You can't use the reflexive triggered ability to try to attach an Equipment to a creature if that Equipment can't legally be attached to that creature.

Artwork
Loading artwork…
Gilgamesh, Master-at-Arms
Final Fantasy · #139 · EN
Nonfoil—Foil—
Card rules
Whenever Gilgamesh enters or attacks, look at the top six cards of your library. You may put any number of Equipment cards from among them onto the battlefield. Put the rest on the bottom of your library in a random order. When you put one or more Equipment onto the battlefield this way, you may attach one of them to a Samurai you control.
6/6
Rare · Illustrated by Lorenzo Mastroianni
Format legality
Alchemy Legal
Brawl Legal
Commander Legal
Competitive Brawl Legal
Duel Legal
Future Legal
Gladiator Legal
Historic Legal
Legacy Legal
Modern Legal
Oathbreaker Legal
Penny Legal
Pioneer Legal
Standard Legal
Standard Brawl Legal
Timeless Legal
Vintage Legal
Old School Not Legal
Pauper Not Legal
Pauper Commander Not Legal
PreDH Not Legal
Premodern Not Legal
Tlr Not Legal
Rulings
Published rulings from the downloaded Scryfall catalog. Source card record · Rules and interactions
If you put an Equipment with job select onto the battlefield with Gilgamesh's ability, the job select ability and the reflexive triggered ability will both trigger, and you'll choose the order in which those abilities go on the stack. For example, if you put the reflexive triggered ability on the top of the stack with the job select ability below it, the reflexive triggered ability will resolve first and allow you to attach the Equipment to a Samurai you control. After that, regardless of whether or not you chose to attach the Equipment to a Samurai you control, the job select ability will create a Hero token and attach the Equipment to the Hero token.