So basically I’m creating a cutscene which instead of using the player’s model uses a rig which I just paste all the player’s things onto such as clothing, face, body colors etc.
But since this is happening in a localscript it doesn’t actually move the player’s accessories to the rig (Head accessories not being moved to the head etc.).
I tried:
for i,v in pairs(char:GetChildren()) do
if v:IsA("Clothing") or v:IsA("ShirtGraphic") or v:IsA("BodyColors") or v:IsA("Accessory") then
local clon = v:Clone()
clon.Parent = rig
end
if v:FindFirstChildWhichIsA("Decal") then
local clon = v.face:Clone()
rig.Head.face:Destroy()
clon.Parent = rig
end
end
But this just didn’t change the position of the accessory to match the position of the rig.
So I tried again:
for i,v in pairs(char:GetChildren()) do
if v:IsA("Clothing") or v:IsA("ShirtGraphic") or v:IsA("BodyColors") then
local clon = v:Clone()
clon.Parent = rig
end
if v:IsA("Accessory") then
local clon = v:Clone()
clon.Parent = workspace
wait()
rig.Humanoid:AddAccessory(v)
end
if v:FindFirstChildWhichIsA("Decal") then
local clon = v.face:Clone()
rig.Head.face:Destroy()
clon.Parent = rig
end
end
But this script; gives a warning of “AddAcessory failed: Accessory is already being worn by another character.”
I found that AddAccessory() doesn’t work properly on client
And i think that’s the problem, try to move script to the server
Alternatively you can change Part1 property in AccessoryWeld inside accessory to rig’s head
(I don’t know how HumanoidDescription works, so maybe @glowyogurt’s solution will be better)