Is there any way to distinguish an accessory from being a hat, eyewear, shoulderwear, etc?

Something like this is already implemented, though. Getting the asset IDs of Roblox accessories on the character is already possible to an extent with the HumanoidDescription system. Using the HumanoidDescription.HatAccessory property, for example, provides you with the asset ID of any Roblox hats the player is wearing. The problem (according to my assumptions based on the data type of the property) was that the accessory properties only provided one ID, even when there were more than one of the same Roblox accessory type on a humanoid.

However, after further inspection, it appears I was wrong about this: the properties are described as a string with each accessory ID separated by a comma. This allows you to get the accessory type of every Roblox accessory on a humanoid without even using MarketplaceService like the solution to the other thread did. Simply go through each accessory property of the humanoid’s description and store the ID with the accessory type (which can be derived simply from which property you’re using).

For @laughablehaha’s case it is not necessarily to get the type of any accessories anyway. Simple set the HumanoidDescription.HatAccessory of every humanoid to an empty string:

local humanoid = character.Humanoid
local description = humanoid:GetAppliedDescription()
description.HatAccessory = ""
humanoid:ApplyDescription(description)

This should be done on the server.

13 Likes