Matching Outfit Generator

Hey y’all,

I had an idea today, I wanted to make a game where it generates outfits. However, I do not want the outfits to be random, I want it to actually be matching. The outfit includes shirts, pants, hats, hairs and packages.

So far, I’ve tried looking for players and loading their outfits, however, that is extremely inefficient as there is no way to tell if their outfit is matching or not.

My question is, is this even possible? If so, how would it be possible to make it. I am not looking for a script, I am looking for the basic logic to do so.

So basically, roblox has this service called “TeamService” or something along the lines of that. In basic terms, you can assign random players to one specific team, and other players to another team, And give them outfits according to their team.
Resources:
Team service in API reference:

Helpful conversation on randomizing plyers.

If you still need more help, I am online 15/7.
Thanks,Cj.