From the Super Mario Wiki
Mecha Fly Guys are toy Shy Guys which appear in the first two Mario Party games.
In Mario Party, the Mecha Fly Guy is sold in the Mushroom Shop for 100 coins. After being purchased, it is sent to the Mini-Game House. Selecting it makes people play a little game, where they have to rotate the as many times as possible for 10 seconds. Then, the little toy flies around the front of the room until it falls on the floor. Then it says how long its flight was, and how many times the player rotated the . Then it makes a comment on how well (or how poorly) the player did.
Mario Party 2
In Mario Party 2, Mecha Fly Guys only appear in the minigame Mecha-Marathon. The color of the Mecha Fly Guy matches the character that uses it.