Hello,
I have a catalog system which works 100% although I’m having issues implementing layered clothing to it.
My system works fine and the layered clothing wraps properly on the character until I replace a character’s bodypart.
This is basically how the layered clothing is being set.
local obj = InsertService:LoadAsset(data.id)
local Accessory = obj:FindFirstChildOfClass('Accessory')
if Accessory then
if Accessory:FindFirstChild'Handle' then
Accessory.Handle.CanCollide = false
end
if plr.Character:FindFirstChild(data.id) then
plr.Character[data.id]:Destroy()
return
end
Accessory.Name = data.id
plr.Character.Humanoid:AddAccessory(Accessory) -- here is how
return
end
And here is how I remove body parts (overwriting them has exactly same code).
MainRemote:FireClient(plr, {action = 'state', value = false})
for _, v in ipairs(data.item) do
local Face, Overhead
if v.Name == 'Head' then
pcall(function()
Overhead = plr.Character.Head:FindFirstChildOfClass'BillboardGui':Clone()
Face = plr.Character.Head.face.Texture
end)
end
local NewBodyPart = ClientAssets.DummyR15[v]:Clone()
plr.Character.Humanoid:ReplaceBodyPartR15(Enum.BodyPartR15[v], NewBodyPart)
if Face or Overhead then
pcall(function()
Overhead.Parent = plr.Character.Head
plr.Character.Head.face.Texture = Face
end)
end
end
MainRemote:FireClient(plr, {action = 'state', value = true})
plr.Character.Humanoid:SetStateEnabled(Enum.HumanoidStateType.Dead, data.value)
Screenshots:
Without touching bodyparts on join:
When changing bodytype:
You can see it really small somewhat inside the character.
I’m assuming I need to make a change to the HumanoidDescription but I really got no clue what’s needed to be changed there for bodyparts.
Thank you for any support I may get