I am making a game that includes having people type in a username, and it loads that username's avatar onto a dummy. Here's the following code:
script.Parent.MouseButton1Click:Connect(function()
local PlrName = game.Players:GetUserIdFromNameAsync(script.Parent.Parent.NameBox.Text)
local Guy = game.Players:CreateHumanoidModelFromUserId(PlrName)
game.Workspace.Dummy.Head.face.Texture = Guy.Head.face.Texture
for i, v in pairs(Guy:GetChildren()) do
if v:IsA("Clothing") or v:IsA("BodyColors") or v:IsA("Accessory") then
v.Parent = game.Workspace.Dummy
end
end
end)
I also will show the gui it holds: https://gyazo.com/a45733647976d92da536795cc4c9e513
Whenever I use this, it shows me an error saying that the username is incorrect. I did some digging around, and found out it's only locking the text when you first run the game. I figured this out by making the text a username, for example "ROBLOX" before running the game. And it worked. Anyone have an idea for how to help?
Thanks!

1 comment
lordy be, im having the same issue i think where the text label will not change. godspeed dude, hope you get it fixed