Accessories added by script not showing up

I have a simple rig model (not at all related to the player model) in which I have a script to manually put in the accessories, character meshes, shirt, pants, body color and face of another rig model onto this model all locally on the client. It is a shown here.

local CharacterSelectRoom = workspace.CharacterSelect

local rig = game.ReplicatedStorage.Avatars:WaitForChild("Template1")

local function switchCharacter()
	local character = CharacterSelectRoom:WaitForChild("Showcase")

	local rigClone = rig:Clone()
	rigClone.Parent = game.ReplicatedStorage
	local rigChildren = rigClone:GetChildren()

	for i,v in pairs(rigChildren) do
		if v:IsA("Accessory") or v:IsA("CharacterMesh") or v:IsA("Shirt") or v:IsA("Pants") then
			v.Parent = character
		elseif v:IsA("BodyColors") then
			character:WaitForChild("Body Colors").Parent = nil
			v.Parent = character
		elseif v:IsA("Part") and string.match(v.Name, "Head") then
			character:WaitForChild("Head"):WaitForChild("face").Parent = nil
			v:WaitForChild("face").Parent = character:WaitForChild("Head")
		end
	end

	rigClone.Parent = nil
end

switchCharacter()

Although most of it works as intended, the accessories do not show up at all, despite being present within the client’s workspace, with the handle and attachment point being perfectly fine.

I have got no clue why it does not work, please help.

You’re supposed to use :AddAccessory on the humanoid, also have you tried to just use HumanoidDescription to swap appearances between these characters?

1 Like

I did try using :AddAccessory(v) and :AddAccessory(v:Clone()) but I would get AddAcessory failed: Accessory is already being worn by another character. and still have the same issue as before respectively.

I would’ve used HumanoidDescription but uh the rigs that I was supposed to clone from has all of its shirts, accessories, like anything added manually, not updating the humanoid description. And I don’t know how to backtrack where I got those.

If the accessory is worn by another character, you can make it more simple

local xv = v:Clone()
xv.Parent = workspace
:AddAccessory(xv)