How to set image label's image through a script

Hello I have this image and I want to change it automatically using rbxthumb. My system to do this already works however for some reason when i change the image to be the rbxthumb it shows nothing

here is how I’m changing it:

clone.Image = "rbxthumb://type=GameIcon&id=10678069450&w=150&h=150"

However for some reason it just pops up as this:
image

I don’t know what this link is, but I don’t think it’s supported. Publish image you need as decal and copy paste that link instead of one you’re using. Maybe it will help.

1 Like

Because it isn’t a decal. Make it a decal. Normally, your link should look like: "rbxassetid://(Id)

Also i just realized… Furry detector

2 Likes

Is ‘clone’ created via the Clone instance method? If so make sure you set its ‘Parent’ property (this is often overlooked).

1 Like

I didn’t include the full issue because it is a lot easier to explain this than that. I have to use rbxthumb:// because I’m trying to load the icon of every item in a players inventory.

heres my code:

	local AssetIdToThumbtype = { 
		["Asset"] = {1,3,4,5,10,13,24,38,40,62},
		["Avatar"] = {9,2,3,4,8,10,11,12,17,18,19,27,28,29,30,31,32,40,41,42,43,44,45,46,47,48,49,57,58,64,65,66,67,68,69,70,71,72},
		["BadgeIcon"] = {21},
		["GamePass"] = {34}
	}

for i,v in pairs(Suspected.Favorites) do
		print(v)
		local clone = Results.All.Template:Clone()
		print(getAssetType(v.Item.AssetType))
		clone.Visible = true
		clone.Parent = Results.All

		local Thumbtype = nil
		
		for A,B in pairs(AssetIdToThumbtype) do
			if table.find(B, v.Item.AssetType) then
				Thumbtype = A
			end
		end
		print(Thumbtype)
		clone.Image = "rbxthumb://type=Asset&id=" .. v.Item.AssetId .. "&width=420&height=420"
		clone.ScrollingFrame.Na.Text = v.Item.Name

	end
1 Like

Still not sure if that’ll work though. Nevermind, it should work.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.