Trying to make a radio, but I can't get it to work

Hi everyone, I am trying to make GUI, for a radio, but the script isn’t working and I don’t know what’s wrong. I tested in both Studio and an actual game window and I get the same error.

This is the script, it always returns “Invalid or non-existing”

	local textbox = script.Parent.Parent
	
	local id = tonumber(textbox.Text)
	if id then
		local success, err = pcall(game:GetService("MarketplaceService"):GetProductInfo(id))
		if success then
			if game:GetService("MarketplaceService"):GetProductInfo(id).AssetType == 3 then
				
				local args = "music-change"
				
				game.ReplicatedStorage.VIPCommands:FireServer(id, args)
			else
				textbox.Text = ""
				textbox.PlaceholderText = "ID is not a sound"
				wait(2)
				textbox.PlaceholderText = "Enter costum song ID here"
			end
		end
		if err then	
			textbox.Text = ""
			textbox.PlaceholderText = "Invalid or inexisting ID"
			wait(2)
			textbox.PlaceholderText = "Enter costum song ID here"
		end
	else
		textbox.Text = ""
		textbox.PlaceholderText = "ID must be a number"
		wait(2)
		textbox.PlaceholderText = "Enter costum song ID here"
	end
end) ```

There were a few things you were doing wrong, one of them was looking for “AssetType” instead of “AssetTypeId”. You also need to check if the input ID is a number by using tonumber() for it to notify the player that the input ID is not a number. The code below should fix any and all issues.

local textbox = script.Parent.Parent

local id = textbox.Text
if id then
	local success, err = pcall(function()
		game:GetService("MarketplaceService"):GetProductInfo(id)
	end)
	if success then
		if game:GetService("MarketplaceService"):GetProductInfo(id).AssetTypeId == 3 then

			local args = "music-change"

			game.ReplicatedStorage.VIPCommands:FireServer(id, args)
		else
			textbox.Text = ""
			textbox.PlaceholderText = "ID is not a sound"
			wait(2)
			textbox.PlaceholderText = "Enter custom song ID here"
		end
	end
	if err then	
		local number = tonumber(id)
		if number then
			textbox.Text = ""
			textbox.PlaceholderText = "Invalid or inexisting ID"
			wait(2)
			textbox.PlaceholderText = "Enter custom song ID here"
		else
			textbox.Text = ""
			textbox.PlaceholderText = "ID must be a number"
			wait(2)
			textbox.PlaceholderText = "Enter custom song ID here"
		end
	end
end