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?
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)