I made a simple preloader that you can use to create loading screens
This preloader has auto retry on timeout, the default retry amount is 5.
Which means this module will retry 5 times every 1 second, but you can change that in the module.
API:
Methods:
Module.new() → Constructor
Creates a new constructor
Constructor:Add( content : string | Folder , Priority : number? )
You can add a content id or a folder, to load in.
The default priority is 2 which is low.
High - 1
Low - 2
Content with high priority will load first and if it fails, it retry.
Constructor:Load()
Loads all the content
yields
Constructor:GetItemsToLoad(priority : number?)
Gets the items to load (it returns all the content ids), leave priority blank to return ALL the items to load from both priorities.
Properties
Module.PriorityType → { HIGH = 1; LOW = 2 }
PriorityType.HIGH | PriorityType.LOW
HIGH = 1
LOW = 2
Constructor.prioritiesStatus → { High = { Failed = {}, Loaded = {} }, Low = { Failed = {}, Loaded = {} } }
Returns all the content ids for each priority in failed or loaded table.
Feel free to customize it to your liking, you can use signal to add events to check for once a priority/item loads or use promises etc.
This is just a simple and quick preloader I made that anyone can use in their games.
This module is not maintained.
Get it here: