Unable to download sound data

my script works perfectly fine but when i press play then it is unable to download the sound data and it stops after 10 seconds and then it works fine but its getting pretty annoying that i have to clear my output everytime im debugging.

here is my script sorry about the explanation it was pretty bad.

local main = {}

main.SoundIds = {

	Concrete = {
		"rbxassetid://6026529903",
		"rbxassetid://6026529887",
		"rbxassetid://6026529862",
		"rbxassetid://6026529840",
		"rbxassetid://6026529818",
		"rbxassetid://6026529791",
		"rbxassetid://6026529773",
		"rbxassetid://6026529752",
		"rbxassetid://6026529732",
		"rbxassetid://6026529709",
		"rbxassetid://6026529682",
		"rbxassetid://6026529649",
		"rbxassetid://6026529624",
		"rbxassetid://6026529596",
		"rbxassetid://6026529570",
		"rbxassetid://6026529548",
		"rbxassetid://6026529529"
	},

	Dirt = {
		"rbxassetid://6026529510",
		"rbxassetid://6026529479",
		"rbxassetid://6026529455",
		"rbxassetid://6026529426",
		"rbxassetid://6026529403",
		"rbxassetid://6026529380",
		"rbxassetid://6026529353",
		"rbxassetid://6026529332",
		"rbxassetid://6026529302",
		"rbxassetid://6026529285",
		"rbxassetid://6026529263",
		"rbxassetid://6026529241",
		"rbxassetid://6026529218",
		"rbxassetid://6026529201"
	},

	Glass = {
		"rbxassetid://6026529185",
		"rbxassetid://6026529160",
		"rbxassetid://6026529132",
		"rbxassetid://6026529110",
		"rbxassetid://6026529091",
		"rbxassetid://6026529067",
		"rbxassetid://6026529041",
		"rbxassetid://6026529021"
	},

	Gravel = {
		"rbxassetid://6026528992",
		"rbxassetid://6026528968",
		"rbxassetid://6026528938",
		"rbxassetid://6026528910",
		"rbxassetid://6026528890",
		"rbxassetid://6026528867",
		"rbxassetid://6026528838",
		"rbxassetid://6026528810",
		"rbxassetid://6026528783",
		"rbxassetid://6026528757"
	},

	Metal_Chainlink = {
		"rbxassetid://6026528733",
		"rbxassetid://6026528705",
		"rbxassetid://6026528676",
		"rbxassetid://6026528646",
		"rbxassetid://6026528628",
		"rbxassetid://6026528611",
		"rbxassetid://6026528585",
		"rbxassetid://6026528552"
	},

	Metal_Grate = {
		"rbxassetid://6026528156",
		"rbxassetid://6026528216",
		"rbxassetid://6026528188",
		"rbxassetid://6026528244",
		"rbxassetid://6026528266",
		"rbxassetid://6026528287",
		"rbxassetid://6026528308",
		"rbxassetid://6026528332",
		"rbxassetid://6026528357",
		"rbxassetid://6026528385",
		"rbxassetid://6026528410",
		"rbxassetid://6026528441",
		"rbxassetid://6026528469",
		"rbxassetid://6026528496",
		"rbxassetid://6026528524"
	},

	Metal_Solid = {
		"rbxassetid://6026527724",
		"rbxassetid://6026527764",
		"rbxassetid://6026527787",
		"rbxassetid://6026527808",
		"rbxassetid://6026527837",
		"rbxassetid://6026527863",
		"rbxassetid://6026527891",
		"rbxassetid://6026527914",
		"rbxassetid://6026527941",
		"rbxassetid://6026527966",
		"rbxassetid://6026527992",
		"rbxassetid://6026528021",
		"rbxassetid://6026528049",
		"rbxassetid://6026528077",
		"rbxassetid://6026528109",
		"rbxassetid://6026528135"
	},

	Mud = {
		"rbxassetid://6026527485",
		"rbxassetid://6026527515",
		"rbxassetid://6026527542",
		"rbxassetid://6026527565",
		"rbxassetid://6026527590",
		"rbxassetid://6026527619",
		"rbxassetid://6026527643",
		"rbxassetid://6026527701",
		"rbxassetid://6026527665"
	},

	Rubber = {
		"rbxassetid://6026527312",
		"rbxassetid://6026527333",
		"rbxassetid://6026527355",
		"rbxassetid://6026527373",
		"rbxassetid://6026527397",
		"rbxassetid://6026527418",
		"rbxassetid://6026527438",
		"rbxassetid://6026527460"
	},

	Sand = {
		"rbxassetid://6026526986",
		"rbxassetid://6026527009",
		"rbxassetid://6026527039",
		"rbxassetid://6026527068",
		"rbxassetid://6026527096",
		"rbxassetid://6026527126",
		"rbxassetid://6026527161",
		"rbxassetid://6026527185",
		"rbxassetid://6026527213",
		"rbxassetid://6026527233",
		"rbxassetid://6026527251",
		"rbxassetid://6026527280"
	},

	Tile = {
		"rbxassetid://6026526636",
		"rbxassetid://6026526656",
		"rbxassetid://6026526679",
		"rbxassetid://6026526696",
		"rbxassetid://6026526715",
		"rbxassetid://6026526748",
		"rbxassetid://6026526771",
		"rbxassetid://6026526795",
		"rbxassetid://6026526825",
		"rbxassetid://6026526840",
		"rbxassetid://6026526866",
		"rbxassetid://6026526891",
		"rbxassetid://6026526928",
		"rbxassetid://6026526956"
	},

	Wood = {
		"rbxassetid://6026526251",
		"rbxassetid://6026526275",
		"rbxassetid://6026526300",
		"rbxassetid://6026526323",
		"rbxassetid://6026526351",
		"rbxassetid://6026526385",
		"rbxassetid://6026526422",
		"rbxassetid://6026526450",
		"rbxassetid://6026526470",
		"rbxassetid://6026526499",
		"rbxassetid://6026526518",
		"rbxassetid://6026526541",
		"rbxassetid://6026526561",
		"rbxassetid://6026526588",
		"rbxassetid://6026526612"
	},
	
	Snow = {
		"rbxassetid://6045131088",
		"rbxassetid://6045131054",
		"rbxassetid://6045131022",
		"rbxassetid://6045130992",
		"rbxassetid://6045130947",
		"rbxassetid://6045130914",
		"rbxassetid://6045130868",
		"rbxassetid://6045130832",
		"rbxassetid://6045130795",
		"rbxassetid://6045130744",
		"rbxassetid://6045130703",
		"rbxassetid://6045130649"
	},
	
	Water = {
		"rbxassetid://1201103772",
	}
}


main.MaterialMap = {

	[Enum.Material.Slate] = 		script.SoundIds.Concrete,
	[Enum.Material.Concrete] = 		script.SoundIds.Concrete,
	[Enum.Material.Brick] = 		script.SoundIds.Concrete,
	[Enum.Material.Cobblestone] = 	script.SoundIds.Concrete,
	[Enum.Material.Sandstone] =		script.SoundIds.Concrete,
	[Enum.Material.Rock] = 			script.SoundIds.Concrete,
	[Enum.Material.Basalt] = 		script.SoundIds.Concrete,
	[Enum.Material.CrackedLava] = 	script.SoundIds.Concrete,
	[Enum.Material.Asphalt] = 		script.SoundIds.Concrete,
	[Enum.Material.Limestone] = 	script.SoundIds.Concrete,
	[Enum.Material.Pavement] = 		script.SoundIds.Concrete,

	[Enum.Material.Plastic] = 		script.SoundIds.Tile,
	[Enum.Material.Marble] = 		script.SoundIds.Tile,
	[Enum.Material.Granite] = 		script.SoundIds.Tile,
	[Enum.Material.Neon] = 			script.SoundIds.Tile,

	[Enum.Material.Wood] = 			script.SoundIds.Wood,
	[Enum.Material.WoodPlanks] = 	script.SoundIds.Wood,

	[Enum.Material.CorrodedMetal] = script.SoundIds.Metal_Solid,
	[Enum.Material.DiamondPlate] = 	script.SoundIds.Metal_Solid,
	[Enum.Material.Metal] = 		script.SoundIds.Metal_Solid,

	[Enum.Material.Foil] = 			script.SoundIds.Metal_Grate,

	[Enum.Material.Grass] = 		script.SoundIds.Dirt,
	[Enum.Material.Ground] = 		script.SoundIds.Dirt,
	[Enum.Material.LeafyGrass] = 	script.SoundIds.Dirt,

	[Enum.Material.Sand] = 			script.SoundIds.Sand,
	[Enum.Material.Fabric] = 		script.SoundIds.Sand,
	[Enum.Material.Salt] = 			script.SoundIds.Sand,
	
	[Enum.Material.Snow] = 			script.SoundIds.Snow,

	[Enum.Material.Ice] = 			script.SoundIds.Water,
	[Enum.Material.Glacier] = 		script.SoundIds.Glass,
	[Enum.Material.Glass] = 		script.SoundIds.Glass,

	[Enum.Material.Pebble] = 		script.SoundIds.Gravel,

	[Enum.Material.SmoothPlastic] = script.SoundIds.Rubber,
	[Enum.Material.ForceField] = 	script.SoundIds.Rubber,

	[Enum.Material.Mud] = 			script.SoundIds.Mud

}

function main:GetTableFromMaterial(EnumItem)
	if typeof(EnumItem) == "string" then -- CONVERSION
		EnumItem = Enum.Material[EnumItem]
	end
	return main.MaterialMap[EnumItem]
end

function main:GetRandomSound(SoundTable)
	return SoundTable[math.random(1,#SoundTable)]
end

return main
1 Like

Pretty sure that’s roblox’s fault. That error appears in like every game with sounds.

but is there a way to fix it because there is like 50 sounds which is 50 errors

No. I’m pretty sure there’s no way to avoid the error.

alright thanks for the help.


1 Like

Did you ever check if the sounds where deleted/removed?

That’s not always the root problem and is roblox’s fault or internet being unstable, we can only hope that roblox corp team will listen to brighter side of community and add light but good updates to the api and platform itself. As i believe there’s no way to fix Unable to download sound data using scripts except implementing a loading screen where code will check if sound loaded or not.

1 Like