I have tried debugging it and check it with ai and I can work it out my char just gets attached to the rig and/ or the accessory’s don’t attach properly and fall into the void
My code
local function applyAppearanceToRig(player)
local character = player.Character or player.CharacterAdded:Wait()
local rig = Workspace.Opening.Rig
if not rig then
warn("Rig not found in Workspace")
return
end
-- Clone and apply accessories
for _, accessory in character:GetChildren() do
if accessory:IsA("Accessory") then
local clonedAccessory = accessory:Clone()
clonedAccessory.Parent = rig
clonedAccessory.Handle.Anchored = false
local weld = Instance.new("Weld")
weld.Part0 = rig:FindFirstChild("Head")
weld.Part1 = clonedAccessory.Handle
weld.C0 = CFrame.new(0, 0, 0)
weld.Parent = rig:FindFirstChild("Head")
end
end
-- Clone and apply clothing
for _, item in character:GetChildren() do
if item:IsA("Shirt") or item:IsA("Pants") then
local clonedItem = item:Clone()
clonedItem.Parent = rig
end
end
-- Apply body colors
local bodyColors = character:FindFirstChild("Body Colors")
if bodyColors then
local clonedBodyColors = bodyColors:Clone()
clonedBodyColors.Parent = rig
end
end