I have no errors, but in my game the hair thats supposed to be cloned won't clone. I dont see any issues with Values and nothing with the names of hats in playerList.
local rs = game.ReplicatedStorage local hairList = rs.HairList game.Players.PlayerAdded:Connect(function(plr) local SetHair = Instance.new("StringValue") SetHair.Name = "Hair" SetHair.Value = "Bald" SetHair.Parent = plr -- Loading Data local success, result = pcall(function() Storage:GetAsync(plr.UserId) end) if not success then warn(result) else local LoadArray = Storage:GetAsync(plr.UserId) if LoadArray then hasCharacter.Value = LoadArray[1] SetHair.Value = LoadArray[2] end end plr.CharacterAdded:Connect(function(character) local hairFound = hairList:FindFirstChild(SetHair.Value) if hairFound then hairFound:Clone().Parent = character -- Clone here. end end)
character.Humanoid:AddAccessory(hairFound:Clone()) should be used instead of cloning and setting the parent to the character
The Array doesn't load in time for when the cloning starts making the script think the SetHair is "Bald". All I need to do is add a wait()