How to apply only the hair from the player humanoid description?

im looking for a way to apply only the hair from the player humanoid description.

I tried:
local function onPlayerAdded(player)
local user = player.UserId
local HairID = game.Players:GetHumanoidDescriptionFromUserId(user).HairAccessory
print(user)
wait(3)
local char = player.Character
char.Humanoid:ApplyDescription(HairID)
end

game.Players.PlayerAdded:Connect(onPlayerAdded)

game:GetService("Players").PlayerAdded:Connect(function(Player)
	Player.CharacterAdded:Connect(function(Char)
		local Hum = Char:WaitForChild("Humanoid")
		
		local HairID = game:GetService("Players"):GetHumanoidDescriptionFromUserId(Player.UserId).HairAccessory
		Hum:WaitForChild("HumanoidDescription"):Destroy()
		
		local NewHumDescription = Instance.new("HumanoidDescription", Hum)
		NewHumDescription.HairAccessory = HairID
		
		Hum:ApplyDescription(NewHumDescription)
	end)
end)

or if you want the player to keep their avatar and just set their hair:

game:GetService("Players").PlayerAdded:Connect(function(Player)
	Player.CharacterAdded:Connect(function(Char)
		local Hum = Char:WaitForChild("Humanoid")
		
		local HairID = game:GetService("Players"):GetHumanoidDescriptionFromUserId(Player.UserId).HairAccessory
		Hum:WaitForChild("HumanoidDescription").HairAccessory = HairID
		
		Hum:ApplyDescription(Hum.HumanoidDescription)
	end)
end)
1 Like

alr perfect now the hairAccessoryID is now good but I dont know why but I cant see the hair https://gyazo.com/40779a1e039103f6edbcf18fee79576c

https://gyazo.com/35c0bcc1801a7e0060d9487b6b6c42c6

Isnt it aleady like that? I dont get it.

1 Like