Humanoid:ApplyDescription() not working

I keep getting this error when i attempt to get a humanoiddescription

image

Players = game:GetService("Players")
Player = Players.LocalPlayer
Character = script.Parent
Humanoid = Character:WaitForChild("Humanoid")

Description = Players:GetHumanoidDescriptionFromUserId(Player.UserId)

Humanoid:ApplyDescription(Description)

Why isn’t this working?

Help will be greatly appreciated!

Try putting game.Loaded:wait() at the top of your script.

No errors, but nothing seems to be changing.

It isn’t listed anywhere, but Humanoid:ApplyDescription does not correctly work when used on the client. You’ll need an alternative.

1 Like

its not being used on the client. Its being used from a regular script

Oh, my bad.
I didn’t see it before, but that explains why that error is there. Players.LocalPlayer is nil on the server. You’ll need to fetch it using the character.

LocalPlayer can only be used from a LocalScript.

What are you exactly trying to do with this code? That would be useful for me to help.

Oh my bad, i forgot about that.

Thanks for pointing that out!


Players = game:GetService("Players")
Character = script.Parent
Player = Players:GetPlayerFromCharacter(Character)
Humanoid = Character:WaitForChild("Humanoid")

Description = Players:GetHumanoidDescriptionFromUserId(Player.UserId)

Humanoid:ApplyDescription(Description)

Had to use Player = Players:GetPlayerFromCharacter(Character) instead

2 Likes