Densuu
(DenSuu)
October 25, 2022, 10:22am
#1
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)
CZXPEK
(czo)
October 25, 2022, 10:29am
#2
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
Densuu
(DenSuu)
October 25, 2022, 10:37am
#3
Densuu
(DenSuu)
October 25, 2022, 4:28pm
#5
Isnt it aleady like that? I dont get it.
1 Like