How could I get accessory information from Accessory itself?

I kinda need this to remove oversized UGC accessory and warn user about what accessory was removed from their avatar (as in not just removing accessory, but also obtaining it’s information like the accessory name, like in Doors game).

I’ve tried to check accessory if it has id itself, tried checking if I can obtain accessory object from humanoid description, but I just have no idea how do I obtain information.

1 Like

You can get the ID of the accessory from HumanoidDescription yes, you can ask for the information from marketPlace about that accessoryId.

local MarketplaceService = game:GetService("MarketplaceService")

-- Get the HumDescription of player by ID
local HumDesc = game.Players:GetHumanoidDescriptionFromUserId(userID)
warn("HumanoidDescription Instance of Player:", HumDesc)

-- The ID of the FaceAccessory the player is wearing
local AccessoryID = HumDesc.FaceAccessory -- etc

local Info = MarketplaceService:GetProductInfo(AccessoryID)

-- Print all info about the Accessory from marketPlace
warn(Info)

For testing you could get the HumDesc instance and save it in your place, to read it carefully what it contains:

1 Like

That’s, infact, the approach I wanted to go for. Go through all accessories, check the imported meshpart size and remove it from description if requirement not fulfilled. Thanks for feedback though. Some newbies might find this information useful anyway.

2 Likes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.