Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do I put a user's thumbnail on a decal?

Asked by
s9i 2
4 years ago
Edited 4 years ago

I'm making a script that puts the user's player thumbnail on a decal but it doesn't seem to be working. The script is a LocalScript located in the decal. Here is my code:

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 Decal's content to the user thumbnail
local Decal = script.Parent
Decal.Texture = content

1
is it a local script? where is the script/local script? NarwhalAndMe 141 — 4y
0
You can't use a Decal, keep the code, change the Decal to an ImageLabel and try again Spjureeedd 385 — 4y

Answer this question