AddAccessory already worn by another player?

I’m trying to create tools, without actually using Tool instances (variety of reasons, not important to the question) Anyway. At first I was gonna use models, but gave up on that because trying to weld and position each individual models position on my characters hand was too difficult. So I’m not trying accessory method, but I keep getting this warning

[AddAcessory failed: Accessory is already being worn by another character.]

This is a LocalScript stored in RepStorage. What happens is when the player equips the item, this script gets cloned into the item, and then the item is cloned into the character

local function Equipped()
	-- Weld tool to player
	Humanoid:AddAccessory(script.Parent)
	
	-- Play animation
	local Animation = Humanoid:LoadAnimation(Equip)
	Animation:Play()
	print('Equipped')
end

Equipped()
1 Like

Put the accessory as the child of the script, not the other way around and clone the accessory.

local function Equipped()
	-- Weld tool to player
        Local newAccessory = script.Accessory:Clone()
	Humanoid:AddAccessory(newAccessory)
	
	-- Play animation
	local Animation = Humanoid:LoadAnimation(Equip) -- make sure you define this animation earlier to advoid error
	Animation:Play()
	print('Equipped')
end

Equipped() 
1 Like

I think the accesory should not be parented to the character

1 Like