Duplicate Accessories in a Humanoid Description

Hello, I’ve recently encountered a specific issue when working with accessories and humanoid descriptions. I have developed a system that allowers a user to put an accessory on their character by typing the ID of the accessory into a GUI. When input, the accessory is added to a humanoid description on the server and is then applied to the player. However, when inputting the ID of an accessory that already exists, the ID is not added to the list of accessories in the respective category. For example, if the HumanoidDescription.HatAccessory list contains the IDs “1234” I could add the ID “5678” to the list, making “1234,5678”, but if I tried to add that same ID again, I would get “1234,5678” instead of “1234,5678,5678” as I would hope for.

I am aware from this wiki page that the description cannot contain duplicates but wondered if there is a way to somehow include a duplicate accessory in the humanoid description. If not, I will consider alternatives, such as seeing if an accessory is already present and cloning it if so, but it would be way simpler if I could just achieve apply duplicate accessories using the humanoid description itself. Let me know if you have any workarounds or solutions!

1 Like

The best work around is the one that you described. Look through a table to see if the the ID matches an ID already present and then duplicating the accessory that corresponds to that ID.