Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

find the genre of a hat player is wearing?

I want to know the genre of the hat a player is wearing.

Each hat in the roblox catalog has a genre, most of them have the genre "All".

--no code below because I have no idea where to start.

2 comments

0

I think it's possible, but you have to get the ID of each single hat on roblox to do that, and it will be very long to do that.

0

Can’t I just use the roblox catalog api to do that?

2 answers

✓ Accepted answer

I actually found a way to do it with the catalog API, I had to host a proxy server but it's worth it. The keyword parameter is a bit fuzzy but it works, any anomalies just tags the hat as an "All" hat.

tl;dr I just basically search every genre using the genre parameter and search for the hat name using the keyword parameter. if hat name = name of the player hat then the genre = whichever genre it is checking for.

Checking Horror Catagory to find the hat "Black and Red". Click here for Gif

thanks to everyone that helped :D

Edit: Screenshot to show that I got it to actually work for people who want to attempt this. https://prnt.sc/qk7xmq

My version takes up to 1-2 minutes to scan the catalog and match. That's if the player has a lot of accessories.

This discussion is preserved as it was. New answers, comments, and votes are closed.