How to remove audios from game with the error, "failed to load sound"

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?

1 Like

means you are not the owner of these sounds, the new roblox audio update sucks.

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

btw 64574087 is your userid.

1 Like

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?

anyway, i never encountered that error, you should try clicking it since it told you to do so.

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 :man_facepalming:

probably you are not login-ed to roblox studio, or your team create leader kicked you out :man_shrugging:

It’s my own game that I’m logged into. Nobody in team create uploaded them, they’re sounds from a sound pack I found in the toolbox

I ended up just deleting it because I can’t find a good solution anywhere

1 Like