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

Preloaded Sounds work in Studio but don't work Online?

Asked by 9 years ago

I've been using another bit of code for reference to make a preloaded sound script. I tested it, and it worked in Studio. However, no sounds were made in Online mode. I'm trying to get the sounds working in Online like they do in Studio.

while true do wait(1)
local library = game.ServerStorage.SoundContainer:GetChildren() 
    for i = 1, #library do
        if library[i]:IsA("Sound") then
            game:GetService("ContentProvider"):Preload(library[i].SoundId)
    end
end
print("Sounds ready")

local Derezzed = Instance.new("Sound")
Derezzed.Parent = game.Workspace
Derezzed.SoundId = "http://www.roblox.com/asset/?id=244726378"
Derezzed:Play()
Derezzed.Volume = 1
print("Derezzed successful!")
wait(5)
Derezzed:Pause()
local Fall = Instance.new("Sound")
Fall.Parent = game.Workspace
Fall.SoundId = "http://www.roblox.com/asset/?id=188991458"
Fall:Play()
Fall.Volume = 1
wait(5)
Fall:Pause()
print("Fall successful!")
end
0
Anything coming out in the F9 console? HungryJaffer 1246 — 9y
0
Content failed because HTTP 404 (HTTP/1.1 404 Not Found) Raven_Caedes 95 — 9y

Answer this question