how would i pick random shirt, pants, hat, face and hair from player inventory?
This is more complicated than you think. First of all the player must have their inventory settings set to open/visible to non-friends and non-followers. Secondly, you must use Roblox web API to fetch each category of their inventory you want to use and lastly deal with stuff like pages/cursors, proxies, and HTTP requests. Then after you have all that inside the game as Roblox tables simply use something like math.random
to randomly pick one of each category.
PS: OR if you want to bypass the inventory check, you can have a list of all ids of a category stored in the server and spam MarketplaceService
with requests to check if a user owns each one of them. However, that’s pretty much impossible for categories like shirts and pants and will annoy the server very very much for all the other categories as well.
Also this might be helpful: