Why would I ever want to use PreloadAsync?

When the player joins the game, roblox loads all the assets, so what the point of using preload async if roblox is already loading everything in for the client? What do people use it for mainly?

3 Likes

As mentioned in the API, “This can be used to pause a script and not use content until it is certain that the content has been loaded into the game.” I use it personally when loading GUIs, allowing for the map to load before executing the scripts to allow for spawning so players dont see the entire map.

5 Likes

The game will only load some things. Lots of it won’t appear right away by default (with the game more akin to loading it after you join).

If you have something like a union that’ll be a platform for the player, then they can fall off the platform if it hasn’t loaded yet. So you can use PreloadAsync to load that before teleporting them.

Otherwise - stuff like GUIs (like @Viztec mentioned), anything you’ll store on the server, unions, meshes etc is all useful to have in that. So the game loads before players see anything.

3 Likes