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

find the genre of a hat player is wearing?

Asked by 5 years ago

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.
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. TheRealPotatoChips 793 — 5y
0
Can’t I just use the roblox catalog api to do that? player178 15 — 5y

2 answers

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

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.

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

I'm not too sure but i'm pretty sure you can use:

Players:GetCharacterAppearanceInfoAsync

Here is a developer article about it: https://developer.roblox.com/en-us/api-reference/function/Players/GetCharacterAppearanceInfoAsync

0
that looked useful but no luck whatsoever, is there a way to use the Catalog API to acomplish this? player178 15 — 5y

Answer this question