Creating a character customisation using both catalogue and custom made accessories

I’m having trouble finding the best way to create a character customisation using not only catalog items, but also custom made items (not UGC item, those count as catalog)

I’ve made one before, using HumanoidDescriptions and simply using GetHumanoidDescriptionFromUserId and then making edits, and then simply loading their character with those edits made LoadCharacterWithHumanoidDescription and this working brilliantly with catalogue items. I could keep a module with catalogue ID’s for all sorts of items, like accessories, shirts, pants, faces, etc.

However, I want to go one step further and create something that allows for custom accessories, however, since these items aren’t uploaded to the catalogue, they aren’t technically ‘accessories’ and thus just models. So my question is how can I easily go about incorporating this? Do I need to ditch the HumanoidDescriptions?

1 Like

Let me quote something from a Developer Hub Article

So I don’t really recommend mixing them both just like that, but what I would do regardless is make my own HumanoidDescription Module that handles this.

local HumanoidDescription = {}

	HumanoidDescription.ExternalAccessoires = {}
	
	function HumanoidDescription:AddAccessoire(Accessoire)
		if Accessoire:IsA("Accessory") then
			self.ExternalAccessoires[Accessoire.Name] = Accessoire
		end
	end
	
	function HumanoidDescription:RemoveAccessoire(Accessoire)
		if Accessoire:IsA("Accessory") then
			self.ExternalAccessoires[Accessoire.Name] = nil
		end
	end

	function HumanoidDescription:ApplyToCharacter(Character)
		-- First, apply the HumanoidDescription
		
		-- After, apply all Accessoires that are in the ExternalAccessoires Table
	end

return HumanoidDescription

I can’t guarantee that this method would work, but in theory it should.

7 Likes