This is probably a very simple question but I couldn’t find the answer anywhere here or while browsing. So I’m in the middle of creating a trading system for my game, and came across an issue. I have a script in ServerScriptService and I have a Template in ServerStorage for the avatar’s head-shot. I know how to use GetUserThumbnailAsync() but the way I’m doing it only works for the local player. I thought using #Players might help in a for loop but that didn’t work either. I have a grid setup for every avatar in game just need the thumbnail to clone for EVERY player, I’m probably missing an obvious step so any help is appreciated! Thanks in advanced,
Script (forgot it)
local template = game.ServerStorage:FindFirstChild("Template")
local headType = Enum.ThumbnailType.HeadShot
local headSize = Enum.ThumbnailSize.Size100x100
local Players = game:GetService("Players")
for plr in pairs(#Players:GetChildren()) do
local content, bool = Players:GetUserThumbnailAsync(plr.UserId, headType,headSize)
local temp = template:Clone()
temp.Parent = -- Can do myself
temp.Name = -- Can do Myself
temp.Image = content
end
-Notrealac0unt