Note: Everything in the accessories is Archivable.
I am trying to add accessories to a character model placed in a ViewportFrame.
A connection listens for a descendant being added to the player’s character and then clones the descendant if it’s an accessory and parents it to the model in the viewport (currentClone is the model in the viewport):
descendantAddedConnection = character.DescendantAdded:Connect(function(child)
if child:IsA("Accessory") then
local clone = child:Clone()
currentClone.Humanoid:AddAccessory(clone)
end
end)
Without a task.wait() or some sort of yield, the code above creates an empty accessory instance. I’m guessing this is because none of the children loaded (the accessories are being cloned from ServerStorage and parented to the character from the server).
Adding a task.wait() before local clone = child:Clone() seems to clone the accessory’s children, but the viewport character does not hold it at all.