Why wont the images load when I put a image id in the textbox?

local MP = game:GetService("MarketplaceService")

local function check(img)
	local success, productInfo = pcall(function()
		return MP:GetProductInfo(img)
	end)
	if success then
		return true
	else
		return false
	end
end

script.Parent.FocusLost:Connect(function()
	local tn = tonumber(script.Parent.Text)
	local checkimg = check(tn)
	if checkimg then
		local text = "rbxassetid://"..tn
	end
end)

This is my code, I tried to change the image of my shiftlock in the textbox but the image doesn’t load. How can I make a function that gives me the real image id instead of its asset id?

1 Like

This

You’ll have to change the proxy it uses on line 8 because rprxy.xyz doesn’t exist anymore but this should work after that.

This really confuses me, can you integrate it with my current code?

I can’t directly integrate it because HttpService can’t make requests on the client.

then what you provided wouldn’t work. This is client to a datastore which the shiftlock changes based on that datastore value