Humanoid:ApplyDescription() DataModel was not available

I have recently found use to Humanoid:ApplyDescription but I have encountered an error, this happens after i’ve already set the character’s description once they joined the game but I try to set it again when they die, it errors. Is it possible to apply the description more then once? I’ve made sure that i’m applying the description to Humanoid and that it isn’t the same description as the current one but no luck, having the same error…

if plrData.Character ~= "Custom" then
	Humanoid:ApplyDescription(ReplicatedStorage.Characters[plrData.Character].CharacterData)
end
1 Like

Is that a valid reference? You could just parent the HumanoidDescription instance directly to ReplicatedStorage, like so:

Humanoid:ApplyDescription(ReplicatedStorage:WaitForChild(“HumanoidDescription”))

Yeah it is, reaches the path. That’s not the error :expressionless:

You get any error in console?
You wait until the humanoid exist again after the player dies and respawn?

No errors, I do, no idea of the cause

Maybe you should show more of the script.

Steps occuring
1- Die event triggers
2- CharacterAdded event triggers
3- whats plrData.Character?
if its not equal to “Custom” ? plrData is the player instance? and you are checking if the respawned Character is not equal to “Custom” that would be the name of the Model? if thats the name of the model, you should add .Name

Inside ReplicatedStorage you have a folder called “Characters”? whats inside there?

If you have HumanoidDescriptions stored into that folder, a good way to get them its what @Limited_Unique said, using WaitForChild() and find the HumanoidDescription you want

And debug with prints

if plrData.Character ~= "Custom" then
	Humanoid:ApplyDescription(game.ReplicatedStorage.Characters[plrData.Character].CharacterData)
end

I’m assuming you were attempting to access the ReplicatedStorage folder by name as opposed to setting up a variable which points to it, if so then you need to prefix ReplicatedStorage with “game.” as the replicated storage folder is a member of the game. I’ve made the change in the above script.

1 Like

Maybe its that. But I find weird that @AProgrammedFish was able to set the HumanoidDescription when the Player joined and not after player respawn due to die

HumanoidDescriptions require the Humanoid to be a descendant of a DataModel.

Its a weird error and I wish Roblox refactored it to make it easier to debug this issue.

The reason this is happening is because CharacterAdded is fired before the character is parented to Workspace

In your case, just wait for the Humanoid to be placed into the DataModel utilising AncestryChanged

Player.CharacterAdded:Connect(function(c)
  local Humanoid = c:WaitForChild("Humanoid")
  
  if not Humanoid:IsDescendantOf(game) then
    Humanoid.AncestryChanged:Wait()
  end

  ...
end)
11 Likes

Thank you, that worked… weird error.