Decided to submit this post using the required questions just so I don’t forget anything.
What are you attempting to achieve? (Keep it simple and clear)
The problem I am facing: I recently created a system which would input the player’s ID into a textbox and from there: it would show the player’s profile picture on an imagelabel together with their username
What is the issue? (Keep it simple and clear - Include screenshots/videos/GIFs if possible)
The issue: Right now the line giving me the most issues is this particular one:
game.Workspace.Display.BillboardGui.ImageLabel.Image = game:GetService("Players"):GetUserThumbnailAsync(tonumber(DatabaseBox.Text)),Enum.ThumbnailType.HeadShot,Enum.ThumbnailSize.Size150x150) print(tonumber(DatabaseBox.Text)) game.Workspace.Display.BillboardGui.TextLabel.Text = player.Name else print(tonumber(DatabaseBox.Text)) end
Quick rundown just incase:
- If the database input (numerized due to input compatibility) is NOT nil and not an empty string (basically two checks to make sure no empty input is provided) then:
- the ImageLabel image would fetch the user, using their player ID which is a series of numbers, however:
- (Not really a step but I figured it would help either way). With this particular parameter I figured: if the first parameter is a number, then numerizing string input like this should do the trick as well. However it did not and that’s why I am here
- What solutions have you tried so far? (Have you searched for solutions through the Roblox Wiki yet?)
So far I tried using different functions, like GetPlayerFromUserId combined with this particular function (honestly just experimenting). I always consult the wiki before asking but since most are just plain variables and not really tutorials, I figured this was the place to ask
I hope this answers the question, if not feel free to ask for more details if I missed any.