Why is ROBLOX detecting my textbox text to always be the same?
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:
01 | script.Parent.MouseButton 1 Click:Connect( function () |
02 | local PlrName = game.Players:GetUserIdFromNameAsync(script.Parent.Parent.NameBox.Text) |
04 | local Guy = game.Players:CreateHumanoidModelFromUserId(PlrName) |
06 | game.Workspace.Dummy.Head.face.Texture = Guy.Head.face.Texture |
08 | for i, v in pairs (Guy:GetChildren()) do |
09 | if v:IsA( "Clothing" ) or v:IsA( "BodyColors" ) or v:IsA( "Accessory" ) then |
10 | v.Parent = game.Workspace.Dummy |
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!