Hello!
I’m working on revamping my ban system with displaying a thumbnail of the player that will be banned. The issue is that my output is spammed with "Players:GetUserIdFromName() failed because the user does not exist"
. Is there a way to get around this?
Here’s my script:
script.Parent.Changed:Connect(function()
local userId = game.Players:GetUserIdFromNameAsync(script.Parent.Text)
if userId then
local thumbnailSize = Enum.ThumbnailSize.Size180x180
local thumbnailType = Enum.ThumbnailType.AvatarBust
local thumbnail, isReady = game.Players:GetUserThumbnailAsync(userId, thumbnailType, thumbnailSize)
script.Parent.Parent.AvatarPreview.Image = thumbnail
end
end)