"PBR textures may not be visible in game." error when trying to load in an avatar thumbnail

I am getting a “PBR textures may not be visible in game.” error when trying to load in an avatar thumbnail.

The script essentially takes in a username input from the player and gets the list of all friends of the corresponding player. What’s strange is that it works as expected when I type in my own username, but not another player’s username. The list of friends seems to be successfully retrieved as the avatars of the friends are loaded in like normal, just not the avatar thumbnail.

I only get this error when in the in-game console, not in studio. In studio, nothing seems to be working.

In studio:

In game:

Here is a video showing the problem more clearly:

In studio:
StudioTest

In game:
IngameTest

Here is my code (sorry its a bit messy)

local textbox = script.Parent.Parent:FindFirstChild("TextBox")
local button = script.Parent

local running = false
local playerFolder = false

local players = game:GetService("Players")
local usernameInput = game.ReplicatedStorage.UsernameInput
local scrollFrame = button.Parent.Parent.Parent.Parent.FriendList.ScrollingFrame

local playerFrame = game.ReplicatedStorage.playerFrame
local friendListLayout = game.ReplicatedStorage.FriendListLayout

local ImageSize = Enum.ThumbnailSize.Size420x420
local ImageType = Enum.ThumbnailType.AvatarThumbnail



local function newPlayer(playername, playerId)
	local new = playerFrame:Clone()
	new.Parent = scrollFrame:FindFirstChild("PlayerListFolder")

	local content = game.Players:GetUserThumbnailAsync(playerId, ImageType, ImageSize)
	print(content)
	new:WaitForChild("ImageLabel").Image = content
	new:WaitForChild("TextLabel").Text = playername
end

local function loadList(plr, userId)
	if playerFolder then
		local folder = scrollFrame:FindFirstChild("PlayerListFolder")
		folder:Destroy()
	end
	local friendsId = userId
	local PlayersFriends = {}
	
	local folder = Instance.new("Folder", scrollFrame)
	folder.Name = "PlayerListFolder"
	local layout = friendListLayout:Clone()
	layout.Parent = folder
	playerFolder = true
	
	local success, page = pcall(function() return players:GetFriendsAsync(friendsId) end)
	if success then
		repeat
			local info = page:GetCurrentPage()
			for i, friendInfo in pairs(info) do
				table.insert(PlayersFriends, friendInfo)
			end
			if not page.IsFinished then 
				page:AdvanceToNextPageAsync()
			end
		until page.IsFinished
	end

	for i,v in pairs(PlayersFriends) do
		print("Username = ".. v.Username.." | UserId = ".. v.Id)
		newPlayer(v.Username, v.Id)
		task.wait()
	end
end

button.MouseButton1Click:Connect(function()
	local playerName = textbox.Text
	print(playerName)
	usernameInput:FireServer(playerName)
	
	if not running then
		running = true
		print("running is true")
		local success, errormsg = pcall(function()
			local userId = players:GetUserIdFromNameAsync(playerName)			
		end)

		if errormsg then
			print(errormsg)
			running = false
			print("running is false due to invalid playername entered")
		elseif success then
			local userId = players:GetUserIdFromNameAsync(playerName)
			loadList(playerName, userId)
			running = false
			print("running is false after success")
		else
			print("No errors but nothing happened")
		end
	end
end)

I have looked at other posts on the forums about issues with the same error, but I can’t find a solution or explanation for this.

Additionally, this problem seemingly appeared out of nowhere, as the game worked as expected before, and I had not made any changes to the code.

Any help would be appreciated.

Update: Reverted back to an old version of the game where everything worked normally. The problem is now also happening in old versions. Could this be a Roblox error?

Yeah, this happens quite often. Usually it fixes itself after a day or so in my experience. Annoying, but it eventually goes away.

That’s annoying, thanks for saving me from another day staring at my code.

No worries!

If it doesn’t go away within a day or so, then it MIGHT be something else, though. But like I said, most of the time it goes away on its own.

Good luck!

PS: Feel free to mark my comment as a solution so others are also informed :+1: