What do you want to achieve?
I want to set a imageLabel to a player’s profile picture while their not in game.
What is the issue?
I know how to set a profile picture into a pictureLabel when the player is in a game but while their not in game?
I have no idea how to do it.
What solutions have you tried so far?
I looked on the devForum and couldnt find anything similar.
local userId = script.Parent.userID
local thumbType = Enum.ThumbnailType.HeadShot
local thumbSize = Enum.ThumbnailSize.Size420x420
local content, isReady = game.Players:GetUserThumbnailAsync(userId, thumbType, thumbSize)
script.Parent.poster = content
" Unable to cast Instance to int64 - Client - setter:5"
Is the error that comes up and Im guessing its because the player isnt in the game.
local Players = game:GetService("Players")
local UserId = 000000 -- change it to the userID, does not have to be in-game.
local thumbType = Enum.ThumbnailType.HeadShot
local thumbSize = Enum.ThumbnailSize.Size420x420
local success,result = pcall(function()
return Players:GetUserThumbnailAsync(userId,thumbType,thumbSize)
end)
if success then
script.Parent.Poster.Image = result
end