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

GetUserThumbnailAsync gives an error?

Asked by 4 years ago

I'm trying to use GetUserThumbnailAsync() in a ImageLabel but it gives me the error: Image cannot be assigned to My code is:

local face = script.Parent.Parent.Face
local name = script.Parent.Parent.CName
local textbox = script.Parent.Parent.SoundName
local enter = script.Parent
local players = game:GetService("Players")
local assets = game:GetService("MarketplaceService")
function playsong(song)
    local productinfo = assets:GetProductInfo(textbox.Text)
    local creatorid = productinfo.Creator.CreatorTargetId
    local thumbType = Enum.ThumbnailType.HeadShot
    local thumbSize = Enum.ThumbnailSize.Size180x180
    local content = game.Players:GetUserThumbnailAsync(creatorid,thumbType,thumbSize)
    face.Image = content
    name.Text = ""..assets:GetProductInfo(textbox.Text).Creator.Name
    workspace.Visualizer.Sound.TimePosition = 0
    workspace.Visualizer.Sound.SoundId = song
    workspace.Visualizer.Sound.Playing = true
end
function pausesong()
    name.Text = ""
    face.Image = "rbxasset://textures/ui/GuiImagePlaceholder.png"
    workspace.Visualizer.Sound.Playing = false
end
enter.MouseButton1Click:Connect(function()
    playsong("rbxassetid://"..textbox.Text)
end)

Answer this question