In my game, I like having the output as clean as possible so I don’t have to filter through anything to find errors in my scripts. However, I found a useful sound pack where some of the sounds give an error “failed to load sound” when I try using them.
Is it possible to make a short script which can remove the sounds from my game which give this error? How would I make something like this?
means you are not the owner of these sounds, the new roblox audio update sucks.
anyway,
for i, v in next, game:GetDescendants() do
if (v:IsA("Sound")) then
local id = v.SoundId:split("//")[2]
if (not id) then continue end
local info = game:GetService("MarketplaceService"):GetProductInfo(id)
if (tonumber(info.Creator.CreatorTargetId)-64574087) ~= 0 then v:Destroy() end
end
end
All of the audios are made by other users, I didn’t make any of them. However, some of them do work and some don’t. Will this just delete the sounds which I didn’t upload to roblox myself?
Yes, there’s just 1,500 sounds and it would take literally ages so I would’ve preferred to delete them instead of manually accepting one at a time lol. Whatever gets the errors gone, though
Edit: It says I’m not authorized to grand permissions when I try granting permissions. Interesting