I’m making a large script, and part of it involves cloning the player’s avatar and putting it into a viewport frame for a GUI. It used to work, but now the shirts and pants for the avatar do not load.

I’m being commissioned to make it so I’d rather not leak the whole thing, but it clones the entire player and then updates the CFrame of each part to match the player (I’ve got an idea for later that will use it)
for i,v in pairs(character:GetChildren()) do
newPart = v:Clone()
newPart.Parent = Avatar
if v:FindFirstChild("CFrame") ~= nil and v:FindFirstChild("Position") ~= nil then
newPart.CFrame = v.CFrame
end
if v:FindFirstChild("Anchored") ~= nil then
v.Anchored = true
end
if v.Name == "HumanoidRootPart" then
newPart.Name = "HumanoidRootPart"
newPart.Position = (offset)
end
end
The script used to work flawlessly, loaded my clothes and hats and everything. I can’t tell if this is an API bug or if I’m doing something wrong. The shirts and pants are cloning into the WorldModel, I tested it using print() to make sure they were loading. I even tried loading the humanoid first, still didn’t work. I have yet to publish and test in game, but maybe it works in game but not in studio, I’ve had that happen a couple times.
Any help would be greatly appreciated, thanks!