Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Why does the image become blank?

So I'm thinking of adding a card pack opening system and I've got everything working fine except changing the image anyone know what's wrong? It only becomes a blank image.

	local roll1 = math.random(1, 100)
	
	if roll1 <= 45 then
		card1.Image = "https://www.roblox.com/library/7220627763/Common"
	elseif roll1 > 45 and roll1 <= 80  then
		card1.Image = "https://www.roblox.com/library/7220628357/Rare"
	elseif roll1 > 80 and roll1 <= 99 then
		card1.Image = "https://www.roblox.com/library/7220629093/Epic"
	else roll1 = 100
		card1.Image = "https://www.roblox.com/library/7220629761/Legendary"
	end

1 comment

0

I've found it out since this is an ImageLabel You need to make write out string.format("rbxthumb://type=Asset&id=%s&w=420&h=420", ID) Set the ID to any decal ID you'd like and it's auto insert it into the link. and it should change the image if you do                                                                                                           ImageDecal.Image. = string.format("rbxthum

1 answer

This discussion is preserved as it was. New answers, comments, and votes are closed.