Hey! So I am trying to script a SurfaceGUI for my game, and it seems to not be working for an odd reason. Here is the script:
wait(1)
local MarketplaceService = game:GetService(“MarketplaceService”)
local info = MarketplaceService:GetProductInfo(script.Parent.Button.SurfaceGui.TextButton.GamepassId.Value,Enum.InfoType.GamePass).IconImageAssetId
script.Parent.Image.SurfaceGui.ImageLabel.Image = “rbxassetid://”…info
Before we can give you a clear answer, there is some more info that we need.
1.) Is this inside a Script or a LocalScript? 2.) What is the hierarchy of the script, hence, what does your explorer look like? What is the script parented under, and what all is involved within the hierarchy?
Once you answer these questions, then, you will be able to get some help.
I see it now! The :GetProductInfo() function returns a dictionary. So doing (“rbxassetid” … info) would not work. Instead of info there, you would do info. IconImageAssetId