I’d like to run GetHumanoidDescriptionFromUserId() in a pcall so that if it fails, I can retry it.
The issue is, it always fails in a pcall, so I cannot apply a HumanoidDescription to a Humanoid, simply due to it not being created.
Here’s my code so far:
local positionHumanoid = ((dummyFolder:FindFirstChild(row)):FindFirstChild(position)):FindFirstChild("Humanoid")
success, response = pcall(game.Players:GetHumanoidDescriptionFromUserId(tonumber(positionvalue)))
if success then
positionHumanoid:ApplyDescription(response)
end
I know that positionHumanoid works properly, and all surrounding code does so as well. The issue is in the pcall. Each time this code is run it returns success as false.
This code however does work:
local positionHumanoid = ((dummyFolder:FindFirstChild(row)):FindFirstChild(position)):FindFirstChild("Humanoid")
response = game.Players:GetHumanoidDescriptionFromUserId(tonumber(positionvalue))
positionHumanoid:ApplyDescription(response)
…but it’s not in a pcall, so I can’t use it the way I wanted to!
How can I use GetHumanoidDescriptionFromUserId() in a pcall?