So I wanna make a map voting GUI for my game, but I’m unsure what would be the most optimal way to code it, I also want to add game mode voting later on so what would be the best way to do this?
- use modulescripts and tables
- use folders and values
this is how folders would work for map voting
- script picks random maps and creates folder for each map
- inside each maps folder theres an int value inside them that can be used to check how many votes that specific map has
this is how modulescripts would work for map voting
- modulescript picks random map and stores them in array with metadata asigned to each map that looks like something like this
local Maps = {randommap = {votes = 0}}
- after map has been voted we update the vote in the array and after voting is done we loop through all the maps and check the map with the highest votes
theres not really much of a difference i guess its more of up to what you would prefer however one advantage of using modulescript for map voting would be you could require modulescript in other scripts and easily access data stored in the module
1 Like
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.