HumanoidDescription - How to add/remove an accessory to the HumanoidDescription?

I’m trying to understand the HumanoidDescription, but it’s not clicking for me.

Basically, I’m looking to make a system where people can try on accessories of any sort from the ROBLOX catalog onto themselves. However, I’m looking to achieve this by using the HumanoidDescription.

I understand how to add/remove a singular item from a category. However, what if the HumanoidDescription already has accessories in the category (or more of them in the same category) and I wish to add/remove a specific accessory to it?

Does anyone know how this would be achieved? It’s been giving me a rough time for the past few hours and I’m pretty sure a lot of people on here know better than I do.

Thank you! Any feedback is appreciated. :heart:

Adding accessories: just add a comma and then the new accessory’s ID to the right property. like 12345678 plus the hypothetical 123 accessory would become 12345678,123.

I think I might know how to remove an accessory, but I’m not 100% and I’m not good in explaining.

1 Like

Let me try this real quick, I’ll get back to you in a second.

Unfortunately, it didn’t work; it just adds up the sum of both IDs. I thought it could work cause, for some reason, IDs from HumanoidDescription show as strings, but they’re so confusing to me.

The sum? May I see the relevant code please?

Wait, I read that wrong. Sorry!

Basically, at first, I did the thing with commas like what you said, but it doesn’t add up the second ID; it just shows the first that was on the list.

Then, I had an idea of converting the whole category of a HumanoidDescription to string and then add up a tostring() of the second ID. It just counts them together.

I don’t think the code is necessary; it’s just a singular test line that needs to be mastered in order to apply it to everything else.

Did you apply the description of the modified HumanoidDescription to the player’s Humanoid tho?

I haven’t cause in order to do that, I need to be able to change the description to apply it. However, this whole topic is the issue; I can’t seem to figure out how to add/remove an asset/multiple assets to a description category even if that category was to be empty or have multiple assets in it already.

In that case, I’d still like to see the code. Maybe I can find if something in the code causes it.

There is no code; I can’t seem to figure it out at all.

The game code has nothing to do with the HumanoidDescription part. HumanoidDescription is what I need to figure out so I can implement it.

What about this test line then? Even if the code doesn’t work at all, it could help figure out what’s going wrong.

It’s just what you said, so it’s really not any use.

Any form of help is appreciated!

Update: Still haven’t been able to resolve this issue. Any form of help is appreciated!

You can just parent he accessory to the character and remove it when you unequip it

Maybe I should’ve mentioned it right at the beginning, sorry; I’m looking to save the HumanoidDescription to DataStores, so I can’t go by that method. I need actual IDs so the outfit can reload on next startup.

You can still save the hat ids in the datastore and use game:GetService("InsertService"):LoadAsset(asset_id)[1].Parent = character to load a specific hat id and put it in a player’s character