Get outfit ID player is wearing?

Hey!
Is it possible to get the outfit ID a player is wearing?
By using AvatarEditorService I can get the outfits IDs a player has in roblox account, but, how to know which one of those is currently wearing?
The only idea I have is to compare the HumanoidDescription the player is currently using with all outfits table gotten from its account… seems it will work, but kinda unnecessary if another workaround exist

5 Likes

Did you try GetOutfitDetails?
Looking at the Documentation it seems like an ID is returned. I believe its the outfit id, although i might be wrong.
I’m not able to test the code at the moment so let me know if its right or wrong and i’ll search some more if needed! :+1:

1 Like

Yes. That gives me a table which I will use to compare all outfits in player account with the HumanoidDescription player is currently using. Thats just a table with all assets, colors, scales etc that each outfit has.

But I need to know which outfit (among all outfits player has) is currently using.
Indeed I should I use GetOutfitDetails if I go with my own approach. Im asking for a more straight-forward approach in which I could know the specific outfit player is wearing right now.

1 Like

I figured.
Looking at the docs right now it seems like there isn’t a function like that.
If there is, i’d also love to know since i’ve ran into this issue before.
What you could do though is get the users items and such and check if it matches the json data you get from the GetOutfitDetails.
Thats one way of doing it

1 Like

Yeah… sadly thats what Im doing right now, and seems to work “fine” but. If outfit A is exactly similar to outfit B, and player joins wearing outfit B, I will not be able to know which one player is using, cause both has exactly the same assets, scales etc…

I would like to know if there’s an external API that could help me with this.

I see, well i don’t think there is yet sadly.
Although i did find a resource made by another player called “TheH0meLands” which might help you on your journey.
Hopefully you can use it or get some ideas yourself :+1:

2 Likes

Thank you!, I did not find that post before
Again, sadly, thats the same approach Im using right now, except that theres no need to use roproxy now in order to get the outfits, AVS is enough, but still lack of a method that can tell me which outfit player is using :pensive:

As of now i don’t think there is an easier way to get the result you need.
I personally think this is the best way to do it

2 Likes

Thank you for your help, yeah, probably there’s no other way we could know.
But, that approach will have the same error I did mention before, if there are 2 outfits that are exactly the same, its impossible to know which is the one player is using

1 Like

True, sadly it will be harder than it should be :roll_eyes:
Goodluck with your game though :+1:

1 Like

I dont think Roblox does not provide a direct API to retrieve the outfit ID a player is currently wearing. Your idea of comparing the player’s current HumanoidDescription with the outfits in their account is a reasonable approach, but it can be a bit resource-intensive, especially if the player has many outfits.

  1. Use AvatarEditorService to fetch the outfits available in the player’s account.
  2. Get the player’s current HumanoidDescription.
  3. Compare the player’s HumanoidDescription with the outfits in their account. You would need to check if any of the outfits’ HumanoidDescriptions match the current one.

^ could work.

Keep in mind that this approach may require iterating through a list of outfits, which can be resource-intensive if the player has a large number of outfits.

1 Like

I know… Im aware of that, but I cant find any other solution…

But, actually, while testing this approach which works fine with a low amount of outfits; I notice that it could no matter at all… meh… My first thought it was, that after buying something on marketplace it gets added “somehow” to your current outfit, but its not. Turning your “current outfit ID” as useless cause it seems like something you can “copy/paste” into your default HumanoidDescription. So apparently its more practical ignore what outfit you would be wearing cause you are not wearing any, players are just using a “copy of it” loaded into default HUMdesc one you use for roblox. So I guess the only thing that matters is your current HUMdesc and just prompting the player to edit/overwrite/create a new outfit on their accounts (got from AES)… like “it doesnt matter from which outfit ID you got that HUMdesc… I should only care what you want to save or update based on your selection”… Yeah I’ve been dumb :roll_eyes:

1 Like