The Sound.Loaded event fires when the
/Sound is loaded.
Note this event will only fire at the time the sound is loaded. This means if it is listened for when the sound is already loaded it will not return. Therefore it is recommended to check
Sound/IsLoaded prior to connecting to this event.
This simple function will verify a Sound has loaded by checking the Sound.IsLoaded property. If Sound.IsLoaded is false it will wait for the Loaded event before resuming.
It is important to check Sound.IsLoaded before connecting to the Sound.Loaded event, as if the sound has already loaded the Sound.Loaded event will not fire and the function will yield indefinitely.
local function loadSound(sound) -- Has the sound already loaded? if not sound.IsLoaded then -- if not, wait until it has been sound.Loaded:Wait() end end loadSound(Workspace.Sound)