AddAcessory failed: Accessory is already being worn by another character

game.ReplicatedStorage.RemoteEvents.CharacterCustomize.Hair.hair1.OnServerEvent:Connect(function(plr)
	local storage = game.ReplicatedStorage.Hair
	local char = plr.Character
	
	if char:FindFirstChild("Humanoid") then
		local folder = char.Head.HairStorage
		folder:ClearAllChildren()
		
		local new_hair = storage.Hair1:Clone()
		new_hair.Parent = char
		local head = char.Head
		
		char.Humanoid:AddAccessory(new_hair)
		
	end
end)

The remote event and rest of the script works fine, but when I run it, it simply refuses giving me the error showed in the post’s title. I’m not sure why it’s giving me that, since the accessory is stored in ReplicatedStorage and not a humanoid. Anyone can help?

Before using :AddAccessory you’re parenting the accessory to the character. It doesn’t know it’s the same character so it’s assuming it’s “another character”. Remove that new_hair.Parent = char line, you’re already using :AddAccessory anyways.

2 Likes

I completely forgot about that…

I removed the line and the script “works”, but it’s now adding and immediatly removing the accessory. I’m not sure if it’s affiliated with remote events…?

What do you mean it removes the accessory immediately? Can you record a clip perhaps?

1 Like

nvm, it was an external script that was causing the issue. Now it’s fixed. Thank you very much :>

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