Changing Rig Appearance By Typing Into GUI

Hey there! I’m working on something where you can type a username, which will then turn a rig into whoever’s name that you typed in. I believe I’ve got the script correct to receive what the player has typed, but I’m struggling with changing the rig. Since, it doesn’t show up in Players. Although, there may be a simpler way to do this, but I am pretty average at scripting. Here is my recieve text script. It is a LocalScript in a TextBox in an ImageLabel.

local players = game:GetService("Players") 
script.Parent.FocusLost:Connect(
	function(enterPressed)
		if enterPressed then
			print(script.Parent.Text)
			local id
			pcall(function ()
				id = players:GetUserIdFromNameAsync(script.Parent.Text)
				
			end)
		end
	end
)

I’ll be happy to change up the script or anything if you suggest so. Thanks!

What do you get from the id = statement?

1 Like

If you mean you want to morph a rig with a humanoid, you can use the HumanoidDescription System, which makes this job very easy.

local description = game:GetService("Players"):GetHumanoidDescriptionFromUserId(id)
Humanoid:ApplyDescription(description)
1 Like

It takes the ID from whoever’s name you typed in, I believe

Doesn’t seem to be working. I might’ve done something wrong, but I spotted no errors in the output. It just prints whoever I typed in