CreateCharacterModelFromUserId is not yet enabled - Error

I am making a texbox that inserts the avatar of whatever username the player puts onto a dummy,
this is my script:

-- PLAYER 1
script.Parent.FocusLost:Connect(function()
	local char = game.Workspace[1]
	
	local userid = game.Players:GetUserIdFromNameAsync(script.Parent.Text)
	local desc = game.Players:CreateHumanoidModelFromUserId(userid) 
	local animId = desc.IdleAnimation
	
	char.Humanoid:ApplyDescription(desc)
	
	local animation = game:GetService("InsertService"):LoadAsset(animId):GetChildren()[1]:GetChildren()[1]:GetChildren()[1]
	
	game:GetService("InsertService"):LoadAsset(animId).Parent = workspace
	
	local track = char.Humanoid:LoadAnimation(animation)
	track:Play()
end)

it errors when i press enter after inserting the username into the textbox

“‘CreateCharacterModelFromUserId is not yet enabled’”

Any help would b appreciated cus im a very new scripter

I’ve never heard of that feature, but what you could use is this:

Searched it; that function doesn’t even exist. But when I look in your code, you doesn’t event use CreateCharacterModelFromUserId, you use CreateHumanoidModelFromUserId. I have no idea why it gives that error, but using the forum post I posted you could fix your problem!

1 Like

This is a new method of the players service, but the error it’s giving you is quite self explanatory.

1 Like