Help, script wont display decal and no errors

Hello! For some Context, I am working on an in-game Poll System where players can vote for future updates and stuff and saves every vote using Datastore to display across all servers.

With this I’ve made a simple Gui which allows me to create polls by typing in poll names, descriptions of the poll etc.
In this Gui I have a box called “FirstDescription” which i can type the description of the Poll OR type in only numbers which the server-side script will recognize as a Decal ID

(the server puts all the information i created into the table infoCP1)


This below is the block of code in the main server script which handles if the FirstDescription is either text or a decal

        local folder = PollModel.CurrentPolls.PollSlotA
		folder.NameOfPoll.SurfaceGui.SIGN.Text = infoCP1["NameOfPoll"]
		folder.NameOfPoll.SurfaceGui.SIGN.TextTransparency = 0
		--
		local isPicture = false
		local isOnlyNumbers = tonumber(infoCP1["FirstDescription"])
		if isOnlyNumbers then
			local isImage = game:GetService("MarketplaceService"):GetProductInfo(isOnlyNumbers)
			if isImage and isImage.AssetTypeId == 13 then
				isPicture = true
				folder.FirstDescription.SurfaceGui.SIGN.Text = ""
				folder.FirstDescription.Decal.Texture = "rbxassetid://"..isOnlyNumbers
				folder.FirstDescription.Decal.Transparency = 0
			end
		end
		if isPicture == false then
			folder.FirstDescription.SurfaceGui.SIGN.Text = infoCP1["FirstDescription"]
			folder.FirstDescription.Decal.Transparency = 1
		end

So can somebody help me figure this out because after it doesnt display the decal i checked dev console and the texture was successfully set to “rbxassetid://7729866056”
(7729866056 is an example number)

1 Like

Doing some research on devforum i found the solution

the problem was this line :

"rbxassetid://"..isOnlyNumbers

this was how its supposed to be :

string.format("rbxthumb://type=Asset&id=%s&w=420&h=420",isOnlyNumbers)