I’d like to figure out how to check if a sound is moderated in a script.
Usually, it just stops my entire script (because it’s waiting for the moderated song to be over), and that’s a problem.
I can’t find anything on the DevForum/Hub about this, and I just need some help.
I can send my whole script if needed.
You can use ContentProvider in a
pcall() and check if it’s loaded.
-- The code you put in here will run and it won't stop the entire script
Would you mind showing me a section of code and explaining what you require in more detail?
Here’s a snippet of my code
local sound = getRandomSound()
local name = game:GetService("MarketplaceService"):GetProductInfo(sound).Name
game.ReplicatedStorage.CurrentSong.Value = name
script.Parent.SoundId = baseUrl .. tostring(sound)
print("Sound found! " .. name)
DaxBot:SayMessage("🎶 Now playing: " .. name, "All")
script.Parent.TimePosition = 0
I want to check if a sound is moderated so it can be skipped and have another song chosen. I don’t really know how to explain it better.