Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

Is there a way to get all available hats?

Asked by 5 years ago

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?

0
Maybe try plugins? Pojoto 329 — 5y
0
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. Draebrewop 114 — 5y
0
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! Draebrewop 114 — 5y
0
I checked out a few but couldn't find one that did what I wanted, any other ideas? Draebrewop 114 — 5y
View all comments (3 more)
0
Draw, DjMusa2 81 — 5y
0
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... DjMusa2 81 — 5y
0
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. Draebrewop 114 — 5y

1 answer

Log in to vote
0
Answered by 5 years ago
Edited 5 years ago

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. ;)

Ad

Answer this question