Obviously however you’re getting player for the server script replace that on line 3 or local player =… line.
This is a local script:
local Players = game:GetService("Players")
local player = Players.LocalPlayer
-- Fetch the thumbnail
local userId = player.UserId
local thumbType = Enum.ThumbnailType.HeadShot
local thumbSize = Enum.ThumbnailSize.Size420x420
local content, isReady = Players:GetUserThumbnailAsync(userId, thumbType, thumbSize)
-- Set the ImageLabel's content to the user thumbnail
script.Parent.Image = content
I take no credit for this script I used it for a different project and thought reposting it here will help you.
What i’m trying to do here is a simple “You killed” frame that gets the player who died from server using simple remote event parameters, then firing them to the player who killed client as a frame replacing textlabels with the player who died name and such…
local content = game.Players:GetUserThumbnailAsync(CharPlayer.UserId, Enum.ThumbnailType.HeadShot, Enum.ThumbnailSize.Size150x150)
This should be done on the client (and not passed as an argument to FireClient). Better to consume the client’s bandwidth as opposed to the server’s bandwidth (where possible).