Hey, so I am playing the game and this script that runs the sounds pops up with an error saying that it can't download the song id and another error.

Here is the script I am using to get the sounds to play.

Song = Instance.new("Sound")
Song.Parent = game.Workspace.Tracjs
Song.Volume = 0.5
Song.Looped = false

Assets = {138167455,147758618,181369669}
for _, asset in ipairs(Assets) do
game:GetService("ContentProvider"):Preload("http://www.roblox.com/asset/?id=" .. asset)
end

Song.SoundId = "http://www.roblox.com/asset/?id=" ..Assets[math.random(1,#Assets)] --'http://www.roblox.com/asset/?id=' can also be used.
Song:Play()
wait (50)

Here are the errors that are occurring.

23:42:35.097 - ContentProvider:Preload() failed for http://www.roblox.com/asset/?id=138167455
23:42:35.099 - ContentProvider:Preload() failed for http://www.roblox.com/asset/?id=147758618
23:42:35.101 - ContentProvider:Preload() failed for http://www.roblox.com/asset/?id=181369669

This is another error that is occurring.

23:42:35.098 - Failed to load sound http://www.roblox.com/asset/?id=138167455: Unable to download sound data

Any help would be appreciated, Thanks.

2 comments

0

What do you want this script to do?

0

I am trying to get this script to run the audio assets randomly