Help adding accesory to character

I want to clone accessory to player.

When I start the game it doesnt clone.

I have tried rewriting the script, but nothing works. Nothing is happening in output either.


It clones but does not move with character

local players = game:GetService("Players")
local player = players.LocalPlayer
local RS = game:GetService("ReplicatedStorage")

local character = player.Character or player.CharacterAdded:Wait()

local descendants = character:GetDescendants()

local Acc = RS.Accessory

local function SetTransparencyToZeroAndAddAcc()
    for _, descendant in pairs(character:GetDescendants()) do
        if descendant:IsA("MeshPart") then
            descendant.Transparency = 1
        end
    end
    local human = character:WaitForChild("Humanoid")

    local CloneR = RS.Accessory:Clone()
    CloneR .Parent = character
    human:AddAccessory(CloneR)
end

SetTransparencyToZeroAndAddAcc()

Make sure there’s an attachment in both the character and the accessory’s Handle part else it won’t work. They both have to have the same name.

Source information here


This is the error

This means something else in your game has that accessory equipped. Is there an NPC that is wearing the accessory?

Edit: I’ll be gone for a while (school)

Nope nothing in the game, werid

That’s because when you parent an accessory onto a character it automatically wears the accessory. With this knowledge, when you use human:AddAccessory(CloneR) you’re attempting to wear the accessory twice. To remove this warning delete the add accessory line.

Damn that’s a good observation. But it’s probably better if he removes the CloneR.Parent = character line

The accesory doesn’t attack to my character.

Can you screen shot the accessory and its descendant (Drop down everything)?