:ApplyDescription() not Working

Hi all,

I’m working on a Murder game and on each round you are assigned a random character. (a way to prevent teamers).

task.spawn(function()
	local chosenCharacter = script.Characters.Descriptions:GetChildren()[math.random(1, #script.Characters.Descriptions:GetChildren())]
	local charName = humanoid.Parent.Head:FindFirstChild("CharacterName")
	if charName then
		charName.Frame.CharName.Text = chosenCharacter.Name
		charName.Frame.Role.Visible = true
	end
	humanoid:ApplyDescription(game.Players:GetHumanoidDescriptionFromUserId(1))
	wait()
	humanoid:ApplyDescription(chosenCharacter)
end)

This works, but after few rounds this happens:

After this error, everyone is playing with their original avatars (which was supposed to be a gamepass perk!!! :rage:) . I’m not sure how I can prevent that from happening nor do I think it’s my fault.

Is there any solution to this? Otherwise, is there an alternative? Is crying my only option there?

Thanks in advance!

Have you tried to print out some values?
I cant see the relevant assets, but try to print something like:

print(chosenCharacter)
print(charName)

Also, whats the point of these lines?
Are you trying to change their character twice?

humanoid:ApplyDescription(game.Players:GetHumanoidDescriptionFromUserId(1))
I believe this is the issue, it’s trying to get the id 1 unless that’s intentional. Remove the line and see if it works.

1 Like

Have you tried to print out some values?

Everything works at first, it’s just that after few rounds the “HTTP Internal Error” pops up and characterdescriptions are no longer applied to players. So yes, they are not nil values.

Also, whats the point of these lines?
Are you trying to change their character twice?

This is necessary since I’ve encountered this problem before:

I have changed that line to:

local blank = Instance.new("HumanoidDescription")
humanoid:ApplyDescription(blank)

Hopefully it works, but so far what you’ve said makes sense since that’s the only reason why HTTP requests would get involved in the first place.

That should work but why do you have to change the description twice, isn’t that unnecessary?

I removed the line and this is what happens. So I think it’s necessary that I apply it twice by first applying a blank description before applying the character’s one.

Are you changing the players rig?

Yes, body parts are being changed.

That’s most likely the problem, for some reason I got the same error a while back. The issue was that I didn’t put the right ids for the body parts which messed it up. Are all your ids correct?

It always work so I’m guessing they’re correct. One thing though is that the legs are from 2.0 package while the rest of the body is 4.0 package

Yeah, I don’t think that’s the issue you can use different body parts from different packages. Yeah, that’s a weird bug, there has to be a fix but unfortunately, I’m not quite sure.

1 Like