Too Many Requests (HTTP 429)

Trying to make a GUI that changes the text to be the name of the asset. IDs are set in a table and are looped around.

runserv.RenderStepped:Connect(function()
	local sound = music.SoundId
	local id = string.match(sound, '%d+')
	local Asset = game:GetService("MarketplaceService"):GetProductInfo(id, Enum.InfoType.Asset)
	--All the code above is just checking if the ID in the Sound have changed
	
	local name = Asset.Name
	text.Text = "Song Playing: " ..name
end)

How do I fix this?

You’re getting the id every frame which is too much and causes the error, maybe try checking every 10 seconds:

while task.wait(10) do
local sound = music.SoundId
	local id = string.match(sound, '%d+')
	local Asset = game:GetService("MarketplaceService"):GetProductInfo(id, Enum.InfoType.Asset)
	--All the code above is just checking if the ID in the Sound have changed
	
	local name = Asset.Name
	text.Text = "Song Playing: " ..name
end

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.