Hello im trying to preload the sound but it shows to be not working
local contentprovider = game:GetService("ContentProvider")
for _, v in pairs(game.ReplicatedStorage:WaitForChild("Background Music").BackgroundMusicZones:GetDescendants()) do
if v:IsA("Sound") then
contentprovider:PreloadAsync({v})
print(contentprovider.RequestQueueSize)
end
end
It does? It’s very specified on the ContentProvider API That it loads Decals and Sounds.
Plus, Replying to OP (@simply_kiel), Are you Preloading the sounds on the Client or Server? And are you loading them instantly or after a certain time?
PreloadAsync automatically catches descendants, consider not passing each descendant individually and just pass the main container with all the music instead. As for why it’s not preloading sounds, the only guess I can wager here has already been said; make sure this is done from a LocalScript.
Timing shouldn’t matter. PreloadAsync just marks any content ids in an instance and its given descendants to be moved to the front of the download queue (and if they aren’t already being streamed in in the background, then added to the queue at the front).
Yeah. My guess is that if you have only a couple of asset like maybe a couple hundred they should load pretty quickly.
like 0.0001ms not rly lol
Really should be used if you use a lot of meshes, very long sound tracks or a ton of images.
Depending on your internet and the speed of your device the loading of assets for your device may be too quick for you to measure. If you want my guess try using a slow device.