The hair actually clones onto the player, there are no errors however the hair doesn’t appear. I checked the hiearchy of the character, and the accessory is there, with all of its descendents, but the hair doesn’t appear on the character.
script:
local function updateHairSelection()
local function RemoveHairs()
for _,v in pairs(CharDummy:GetChildren()) do
if v.ClassName == "Accessory" then
v:Destroy()
else
print("There are no hairs to destroy")
end
end
end
if not ClickedMale and not ClickedFemale then return end
print("Player has clicked one or the other")
-- Update the hair selection based on the currentIndex
local currentHair = nil
local hair
if ClickedMale then
print("player has clicked male, showing male hairs")
currentHair = HairChoices.MaleHairs[currentIndex.MaleHairsI]
RemoveHairs()
hair = MaleHairsFolder[currentHair]:Clone()
hair.Parent = CharDummy
elseif ClickedFemale then
print("player has clicked female, showing female hairs")
currentHair = HairChoices.FemaleHairs[currentIndex.FemaleHairsI]
RemoveHairs()
hair = FemaleHairsFolder[currentHair]:Clone()
hair.Parent = CharDummy
end
-- Do something with the currentHair value, like updating an image or text label in the frame
-- Insert the hair accessory on a dummy
end
The accessory is there, but it doesn’t go onto the character’s physical model.