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

How do I change the Image on an ImageLabel?

Asked by
lomo0987 250 Moderation Voter
9 years ago

What i'm trying to do is use GetProductInfo and update the ImageLabel to the picture of the gamepass. The current script that I have so far is..

local id = script.Parent.ID
local Asset = game:GetService("MarketplaceService"):GetProductInfo(id.Value)
local image = script.Parent.Parent.Parent.BInfo.Image

function update()
    image.Image = "rbxassetid://"..Asset.AssetId
end

script.Parent.MouseButton1Down:connect(update)

I have been trying different things but they don't really seem to like to work..

Edit: this is the error..

Image failed to load: rbxassetid://157723795: Failed to resolve texture format

Answer this question