Preload
Preloading downloads a sound's audio ahead of time and keeps it loaded for the whole session, so the sound plays without a delay the first time it is needed.
Sounds tagged VluxySF_Preload in Studio are preloaded by Startup.InitClient. Use AddAsync to preload more at
runtime. This is about the network; to keep built Sound instances ready instead, see Cache.
Called on the server or before the library has started, every function here warns once and does nothing.
Functions
AddAsync
This is a yielding function. When called, it will pause the Lua thread that called the function until a result is ready to be returned, without interrupting other scripts. YieldsPreload.AddAsync(...: string--
The sound names.
) → ()Preloads more sounds by name and yields until their audio has loaded. A name that is already preloaded is skipped, and a name that is not in the schema prints a warning.
VluxySF.Preload.AddAsync("BossRoar", "BossStomp")
Has
Preload.Has(name: string--
The sound name.
) → boolean--
Whether the sound is preloaded, or being preloaded.
print(VluxySF.Preload.Has("BossRoar"))
GetNames
Preload.GetNames() → {string}--
A new array of every preloaded sound name, sorted.
print(VluxySF.Preload.GetNames())