Can’t Preload Audio Players using PreloadAsync

Hey! I haven’t declared this as a bug just yet because I am not sure if this is something I may be doing wrong. While messing around with PreloadAsync I realized that AudioPlayers do not do anything when Preloaded. The function ContentProvider:PreloadAsync() does not error but simply does not run. I changed the AudioPlayers to
be Sounds and it worked but my audio still was not preloaded. Is anyone else able to replicate this? Simply using PreloadAsync in a local script.

1 Like

Instead of preloading based on instance, have you tried reloading the id of sound?

Like what do you mean? Preloading can only be done via a table of instances. .

1 Like

Basically what’s happening is you’re loading the sound, and then because roblox sees that you’re not using the sound, it unloads it from the game immediately. What you have to do is play the sound at volume 0 and check the instance IsLoaded property. Once that property becomes true, that means the sound is actually loaded. This also applies to images too

Oh alrighty, so I have to play the audio silently? Once the audio is finished am I able to destroy it or would it destroying it cause the same issue?

So I have checked out what you were saying and that does seem to be the case. The audio only ever plays successfully for the first time without delays if the audio is parented in game, with its correct asset id. Once I delete the audio player it does unload it causing the audio to once again have a first play delay.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.