Player icon on SendNotification is always empty

Hi. The icon is always empty, I have tried from links to rbxassetid’s to players:GetUserThumbnailAsync(), nothing works. Even owner join videos on YouTube. Does anybody know a solution?
image

Thanks

Client script:

local ReplicatedStorage = game:GetService('ReplicatedStorage')
local Players = game:GetService('Players')
local StarterGui = game:GetService("StarterGui")

--local FeedRemoteEvent = ReplicatedStorage:WaitForChild("SendFeed")
--local PingRemoteEvent = ReplicatedStorage:WaitForChild("CPing")

local function LengthShort(name)
	local newname = ""
	if #name >= 11 then
		newname = name:sub(1, 11).."-"
	else
		newname = name
	end
	return newname
end

local function SendNotification(title, desc, player, duration)
	if not title then return end if not desc then return end if not player then return end if not duration then return end
	local image
	pcall(function()
		image = Players:GetUserThumbnailAsync(
			player.UserId, 
			Enum.ThumbnailType.HeadShot, 
			Enum.ThumbnailSize.Size420x420
		)
	end)
	StarterGui:SetCore("SendNotification", {
		Title = title;
		Text = desc;
		Icon = image;
		Duration = duration;
	})
end

--[[local function AddFeed(KillerName, KillerPing, Distance, VictimPing, VictimName)
	SendNotification(
		"Killed "..LengthShort(VictimName),
		"A distance of "..Distance.." studs.",
		Players:FindFirstChild(VictimName),
		5
	)
end]]

script.Parent.HideButton.MouseButton1Click:Connect(function()
	SendNotification(
		"Killed "..LengthShort("NoobiDerpieDev"),
		"A distance of 10 studs.",
		Players:FindFirstChild("NoobiDerpieDev"),
		5
	)
end)

--[[PingRemoteEvent.OnClientEvent:Connect(function()
	PingRemoteEvent:FireServer()
end)]]

--FeedRemoteEvent.OnClientEvent:Connect(AddFeed)

Try printing the image variable after your pcall, to see if the image is loading correctly.

I also recommend making your own killfeed UI instead of using notifications. Players will like it more because it’s unique.

After printing image, it shows me this:
image
I do remember trying that link in my script, but that also didn’t work.

Do you have any solution?

My friends and I have concluded that this is a Roblox-end mistake. Can anyone confirm this, please?

Got no problem, even when using the same function that sends the notification:
image

I honestly don’t see a problem, although I altered it a bit:

local function SendNotification(title, desc, player, duration)
	if not title then return end if not desc then return end if not player then return end if not duration then return end
	local image
	local pass, image = pcall(Players.GetUserThumbnailAsync, Players, player.UserId, Enum.ThumbnailType.HeadShot, Enum.ThumbnailSize.Size420x420)
	
	if not pass then
		error("Can't load image:", image)
	else
		warn("Image Link:", image)
	end
	
	StarterGui:SetCore("SendNotification", {
		Title = title;
		Text = desc;
		Icon = image;
		Duration = duration;
	})
end

Aaaaaaand then ID 442540778 doesn’t like to show their headshot, because the same player has the problem. Tested with the same code, I got the same result. It’s just that player.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.