How should I go about making an audio search bar like the one in Murder Mystery 2’s radios? I know how to make a search bar, but how do I get a list of all soundIDs Roblox and their names?
If you want to get the sound’s product name and ID, I’d recommend using :GetProductInfo() from MarketPlaceService, which will return the name and ID once defined the asset id you’re looking for (from SoundId). An example of code would be:
local mps = game:GetService("MarketplaceService")
local id = string.gsub(script["Sound"].SoundId, "rbxassetid://", "")
local info = mps:GetProductInfo(id)
print("Name of Sound: "..info.Name.." | ID of Sound: "..id)
what should I do to make all the sounds in the market place available though?
What do you mean by that? You mean when you have more than 1 sound? If you want to do it for all sounds, I’d recommend using a for
loop and it’ll do it for every sound.
You can use the roblox catalog api. Please note that you will have to use a proxy service, as roblox blocks requests to their own site made with HttpService.
Here’s an example of a url you can use:
https://search.roblox.com/catalog/json?CatalogContext=2&Category=9&PxMax=10&Keyword=monstercat
This will query a search for audios with the keyword of monstercat
. You can use a ProxyService to GET from the url.
Not sure if this could be used large scale though, as roblox does rate limit these requests. There is probably a better way.