How Do I Make This Work

Like thsi?

thumbnailImg.Image = "http://www.roblox.com/asset/?id="
	idBox.Text = "9586437451"
1 Like

Or

thumbnailImg.Image = "http://www.roblox.com/asset/?id=9586437451"

like this

thumbnailImg.Image = "http://www.roblox.com/asset/?id=9586437451"

Did my advice work. If not thats rlly the only thing I could think of

no it still don’t not work-------

hover your mouse over the red line when it had the three dots. It will give an estimate of what the problem is

I just need to remove a dot but that did not fix it

Maybe …
thumbnailImg.Image = “rbxassetid://9586437451”
idBox.Text = “9586437451”

That do not work --------------

Are there any other errors being printed currently?

What do you mean--------------


At the output are you getting any red Text?

No but I just used the Print() function and found that something in this line is not working or calling correctly

if string.len(enteredId) > 0 and enterPressed then

This is with the Prints and It stops printing when I put the print where it is right now

--CREATE AD PREVIEW WHEN ID IS ENTERED
local marketplaceService = game:GetService("MarketplaceService")

idBox.FocusLost:Connect(function(enterPressed)
	
	local enteredId = idBox.Text
	
	if string.len(enteredId) > 0 and enterPressed then
		print("Done")
		local productInfo = marketplaceService:GetProductInfo(enteredId)
		if productInfo then
			
			local name = productInfo.Name
			nameLbl.Text = name

			thumbnailImg.Image = "https://www.roblox.com/asset-thumbnail/image?assetId=" .. enteredId .. "&width=420&height=420&format=png"
			print("Complete")
		end
	end
end)

Also the print("Complete) does not print either

This is the only part that is not working in the script before and after work just fine

The way I find out stuff that’s broken is try printing enteredId and enterPressed before the if statement.

And make sure its correct. (Ignore this text__)

For me it seems like everything is fine. Are you sure your entering anything in the TextBox or hitting Enter?

Wait it has to be that enteredId is less than 0 and enterPressrd cause it will end if it is.

It printed
09:57:56.994 920587237 - Client - AdvertisementsClient:34
09:57:56.995 false - Client - AdvertisementsClient:35

When I hit enter it works but I need it to work when I click of of it