How can I efficiently cloned any accessory into a clone of the players character?
With the current method that I am trying, the accessory does clone into the model but does not go to the correct positions. I am trying to figure out how I can make the items go to where they need to be.
For example, the sword is a back item which should go to the back and then the necklace is a neck item which would go to the neck. However when I try to insert these items, they just go to the players head.
Functions["GiveAsset"] = function(id: number, Mannequin: Model)
--will create and give a requested id to the mannequin
local activeMaids = vars["activeMaids"];
local ClothingMaid = activeMaids["ClothingMaid"];
local newAsset = InsertService:LoadAsset(id)
if #newAsset:GetChildren() > 0 then
local Asset = newAsset:GetChildren()[1]; --because insert service is a model with the accessory INSIDE of it.
Asset:SetAttribute("ID", id)
Asset:SetAttribute("AddedAccessory", true)
--TODO TODO TODO figure out how to place items correctly.
local humanoid = Mannequin:FindFirstChildOfClass("Humanoid")
if humanoid then
humanoid:AddAccessory(Asset)
else
Asset.Parent = Mannequin
end
ClothingMaid:GiveTask(Asset)
end
task.wait()
newAsset:Destroy() --destroy parent model.
end

