For whatever reason I'm trying to get a list of all available hats in a script (then put them in a table but that's not important). I know this has been done in games that use limited hats only, and games such as catalog heaven but I looked through an uncopylocked version of catalog heaven and couldn't figure out how it works to get all the gears (skimmed it due to 3000+ lines of code). I've also looked around on google for a little bit but I'm not sure I'm wording my searches correctly. I'm not asking for a script, just maybe a link?
COMMUNITY QUESTION
Is there a way to get all available hats?
1 answer
I recommend using the ":getChildren()" function. What it does is that it scans through whatever object (such as a script or a brick) and gives you back all the children associated with it.
Here's a code sample:
YourTableName = LocationOfYourObject:getChildren()
print(YourTablename)
Here's a DevWiki tutorial: https://www.robloxdev.com/api-reference/function/Instance/GetChildren
If you have any questions or issues, please contact me. ;)
This discussion is preserved as it was. New answers, comments, and votes are closed.

7 comments
Maybe try plugins?
PS, I know it's possible to use InsertService to load in a single hat given an ID, but I'm looking for a way to easily access all hats/accessories.
I'll look around Pojoto but I don't think there's any that do what I'm looking for, thanks for the idea though!
I checked out a few but couldn't find one that did what I wanted, any other ideas?
Draw,
Drae, maybe just try to put all id's? Or maybe there is a script to put ALL hats on the catalog? Or just make a catalog GUI...
The script to get all the catalog's hats is what I'm trying to do... Making a catalog GUI isn't what I'm trying to do, and putting all the IDs of all the items would take centuries.