Pre-loading assets works with all assets not just sound. It needs to be done on the client side as they are downloading these assets into their cache meaning that when you use the asset in game there will not be any delay as the client already has the content. You can tell if a game does not pre-load assets when there is a delay for decay loading or sound playing.
This is part of my load screen script, this script needs to be a localscript in replicated first.
local contentProvider = game:GetService("ContentProvider")
local assets = {
"347778466",
"408497296",
"305161877",
"165065112"
}
for _, asset in ipairs(assets) do
contentProvider:Preload("http://www.roblox.com/asset/?id=" .. asset)
end
You can also track the loading by using "RequestQueueSize" this is a sample from my code:-
local assetNum = contentProvider.RequestQueueSize
local curPer = 0
local curReqSize = 0
while contentProvider.RequestQueueSize > 0 do
curReqSize = contentProvider.RequestQueueSize
if curReqSize < assetNum then
local per = math.abs(math.floor(curReqSize / assetNum * 100) - 100)
if per > curPer then
print(per)
curPer = per
end
end
wait(0.8)
end
Hope this helps.