Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Why does this error keep popping up when I run the game? How do I fix it?

Asked by 5 years ago

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.

0
What do you want this script to do? TechGamar 30 — 5y
0
I am trying to get this script to run the audio assets randomly Yosufgamer -7 — 5y

Answer this question