Humanoid:ApplyDescription not loading in clothes

I made a script that uses :GetUserIdFromNameAsync,:GetHumanoidDescriptionFromUserId and :ApplyDescription, I am trying to morph a NPC into a username that the player types which works fine except the clothes on the NPC.

First script:

--This is a LocalScript inside of a TextBox
local textBox = script.Parent
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local remoteEvent = ReplicatedStorage:WaitForChild("LoadCharacters")

textBox.FocusLost:Connect(function(enterPressed)
if enterPressed then
local userid = game.Players:GetUserIdFromNameAsync(textBox.Text)
if userid then
remoteEvent:FireServer(userid)
end
end
end)

Second script:

--This script is inside of ServerScriptService
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local remoteEvent = ReplicatedStorage:WaitForChild("LoadCharacters")
local NPCs = game.Workspace.People:GetChildren()

remoteEvent.OnServerEvent:Connect(function(player,userid)
local Description = game.Players:GetHumanoidDescriptionFromUserId(userid)
for i,v in pairs (NPCs) do
v.Humanoid:ApplyDescription(Description)
wait()
end
end)

Everytime I try to type in a username it loads in but without clothes.

Examples

Username: BawTheSeal (mine)
Screenshot_1014

Username: Lxvinq_JJ (a friend)
Screenshot_1015

Username: rachjumper (a developer)

None of the clothes show up as you can see.

Is there a fix to this? Or anything wrong with my script? (No errors in output)

Fixed, had to delete the “Shirt” and “Pants” the npc already had.

1 Like

I think you could make this a lot simpler by adding a lot of dummy’s outside of the map and customizing them accordingly

while--whatever variable you want, or you can add an if statement to make it happen forever
--now say the name is default clothes, you would say this:
game.Workspace.defaultclothes--now you need to rename it to apply the attributes. it should end up something like this:
game.Workspace.defaultclothes.Name = StarterHumanoid

this should change the clothes for just the player who meets the variable. Keep in mind you should change default clothes to whatever the name of the humanoid you want is, and you should customize the humanoid if you want the clothes to change. Hope this helped! :smile:

Mark your reply as a solution.

1 Like

My bad, sorry! 30charsactersss

1 Like