I’m trying to create a character creation script which locally clones a blank character model from replicated storage, then tries to call AddAccessory on it. When I try this code server-side, it properly attaches the accessory. When I call it locally however, it parents the hair to the character but refuses to attach it, leaving the hair in its original position.
Does anyone know a way to make it work locally, or another way to attach accessories locally?
Here’s the code:
function SetHair(hairId)
local hairModel = hairModels:FindFirstChild(hairId)
if hairModel == nil then
warn("Unable to find hair model for ID "..hairId)
return
end
hairModel = hairModel:Clone()
hairModel.Parent = workspace
charModel.Humanoid:AddAccessory(hairClone)
end
The attachment, already assembled on this “template character”, is not placed on? Have you tried calling when the Attachment is placed on the character already?
I would very much like to know the same thing. I believe you cannot use AddAccessory on a character in nil or some other form of storage.