Hair attachment problem

local clone = game.ReplicatedStorage.Catalog[args[2]]:Clone()
for _,accessory in pairs(clone:GetChildren()) do
    if accessory:IsA("Accessory") then
        accessory.AccessoryWeld.Part1 = workspace[player.Name].Head -- part0 is the handle
        workspace[player.Name].Humanoid:AddAccessory(accessory)
    end
end

New to accessories, can’t seem to get things working.

image
image
image

You must move the Attachment of the hat down or up until it is well positioned, you can place the Instance on an NPC and move the Attachment until it is well positioned.

This isn’t on a LocalScript, right? I would assume no, because localscripts do not insert accessories correctly.

Personally I’ve never used :AddAccessory(). I would always clone the accessory itself and parent it into the character, and the accessory would respond accordingly by fitting itself on the head properly.

local clone = game.ReplicatedStorage.Catalog[args[2]]:Clone()
clone.Parent = Player.Character --or however you reference it

Its from a LocalScript, I have tried accessory.Parent = player.Character however its the same result, the hair is lower.

Good to know!

The thing about accessories is that they’re only capable of being inserted correctly on the server. On a client, you have to do this manually.

I had a similar issue that you did when I was making my creation system, but I have a function that helped automate placing the accessory on properly:

I would suggest using this to insert your accessories locally.

1 Like