Hi!
I am making a map system for a game of mine. Each map will have its own BGM, time length (how long before the timer runs out) and some other settings.
I want to know whats the most efficient/clean way of approaching this - a folder with IntValues and StringValues, etc⌠or ModuleScript?
I know that games like Flood Escape 2 use a folder with values (I saw the Map Making Kit), other times I saw this be done with a ModuleScript.
So what would you use, ModuleScripts or Values?
EDIT, SEE BELOW FOR REASON FOR EDIT
Thank you so @colbert2677 for correcting me, I myself as I said am new to Modulescripts, so it is nice to know it can perform tables too. I will do more research into them.
Module = {}
Module.FirstMap = {
a = "First value"
b = "Second value"
bool = true
number = 0
}
return Module
I think this works (LOL) I am new to Modulescripts too but having researched this should work. Or you could have a settings folder contained in each map, and the script could just look using the :IsA(âFolderâ) to find it and that may be easier.
Hope this helps 
1 Like
In that case you wouldnât be able to access the map data because you donât return it. Those variables are cleaned up when the function finishes. In this scenario, you usually use a dictionary.
local Module = {}
Module.FirstMap = {
a = "foo",
b = "bar",
bool = true,
number = 0,
}
return Module
1 Like