When i use AddAccessory it give me AddAcessory failed: Accessory is already being worn by another character

So i am making game to try some ugcs ,
so i clone the ugc and make the parent to workspace still it saying it is worn by anthor player ?
here is the code ,

			TryBtn.MouseButton1Click:Connect(function()
				if not on then
					on = true
					local ClonedUGC = Ugc:Clone()
					ClonedUGC.Parent = game.Workspace
					Humanoid:AddAccessory(Ugc)
				else
					on = false

				end
				
			end)

here a video to make it clearer,

and yeah ty,

Slight error, easy fix!

When you do

Humanoid:AddAccessory()

You aren’t passing the clone, you’re passing the original

Here’s your updated code :heart:

TryBtn.MouseButton1Click:Connect(function()
				if not on then
					on = true
					local ClonedUGC = Ugc:Clone()
					ClonedUGC.Parent = game.Workspace
					Humanoid:AddAccessory(ClonedUGC)
				else
					on = false
				end
				
			end)
1 Like

that was silly of me i didn’t notice that but it still doesn’t add the Accessory to the player,is it cuz the script is local?
ty <3

I would 100% assume it has to be done on the server side, (havent really used accessories much myself, so its an honest guess)
You could possibly make use of remote events for that, if you need any help let me know :]

1 Like

And id make sure your accessories parts aren’t anchored, i would check if the clone is being put inside of the player under workspace. Let me know how it all goes

yea i did try that and worked , ty man
here what i did , made a remote event

–
on the client side i made it so when the player click the button it fire an event to the server and than the server add the accesory to the player
simple as that

1 Like

Glad that worked, hope to see a finished product of (what i assume is) your avatar game :]

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