Error when trying to apply humanoid description

So I’m trying to make it so when you click play, it takes the user ID of the one the player pastes into a textbox and loads the player’s avatar onto the rig. But it’s throwing this error:

Players.toyJig.PlayerGui.ScreenGui.TextButton.LocalScript:28: attempt to call a boolean value

Here’s the script

pcall(function(success,result)
		local hd = game.Players:GetHumanoidDescriptionFromUserId(script.Parent.Parent.ManUserID.TextButton_Roundify_12px.TextBox.Text)
		print(script.Parent.Parent.ManUserID.TextButton_Roundify_12px.TextBox.Text)
		game.Workspace.User1.Humanoid:ApplyDescription(hd)
		hd = game.Players:GetHumanoidDescriptionFromUserId(script.Parent.Parent.WomanUserID.TextButton_Roundify_12px.TextBox.Text)
		game.Workspace.User2.Humanoid:ApplyDescription(hd)
	end)()

Help is appreciated!
Also, this is in a LocalScript

Take out the () at the end of the pcall

Here’s the fixed version with some added elements:

local success, result = pcall(function(success,result)
	local hd = game.Players:GetHumanoidDescriptionFromUserId(script.Parent.Parent.ManUserID.TextButton_Roundify_12px.TextBox.Text)
	print(script.Parent.Parent.ManUserID.TextButton_Roundify_12px.TextBox.Text)
	game.Workspace.User1.Humanoid:ApplyDescription(hd)
	hd = game.Players:GetHumanoidDescriptionFromUserId(script.Parent.Parent.WomanUserID.TextButton_Roundify_12px.TextBox.Text)
	game.Workspace.User2.Humanoid:ApplyDescription(hd)
end)

pcall() automaticly calls the function you pass it. pcall() also returns a bool depending on if the function successfully ran or not. So essentially, you were trying to call a bool value like it was a function.

Hopefully everything inside the pcall works as intended.

Hope this helps!

1 Like

Thanks! It’s no longer throwing the error, but the humanoid description still won’t load on the rig as intended
Any other feedback?

Oh no
Humanoid::ApplyDescription() can only be called by the backend server

That means you can only run it via server scripts; consider using remotes.