What is the best way to organize minigames?

Hey, what I’m trying to do is create a minigame game where a random one is selected. Although, I’m struggling on what the best way to store/start them is.

Should I have them all in the one module script under different functions, or in different scripts which I can enable/disable, or anything else? I’m not sure which one would be most efficient.

Thanks in advance!

https://www.roblox.com/games/84868/Minigame-Mania-Uncopylocked

You can probably learn a lot from the above uncopylocked game, it has been used countless times over the years by other creators.

The game created date is 2008 to 2009. Those scripts are very outdated and it is really very unorganized.

No offense but for its time it’s likely better than anything you have ever produced. I didn’t say you should use it, I said you should learn from it as the same concepts still apply one decade later.

1 Like

Maybe you could try by giving them a name and sorting them by their first letters folowing the alphabet order.

You could also asign them a number/word/value to identify it.

I wouldn’t really know what else to suggest, good luck anyways!

1 Like

You should add folders of the maps in serverstorage. Then make a script that would change the parent of map in a new folder in workspace. Make sure that it waits some time before doing the map change (and moves the parent of the old chosen map and replaces it with a new one).

This would be a bad idea as it’s possible the map could undergo some irreversible change while the minigame is being played, typically in most minigame systems the map is cloned and the cloned map is then parented to the workspace, when the minigame is over the cloned map is then destroyed.

my idea is to store the minigame name in a table, and then pick that randomly with table[math.random(1)]. with the random name picked, you can match the string to the name of the minigame model wherever you put it.

copy it in workspace, enable everything… voila! if that doesn’t work, please refer to every other suggestion here

1 Like

Better idea I was gonna say clone the maps so that if something unexpected happens to the map like it destroys then that would be bad and you can’t get the map back. I don’t know why I didn’t type that.

Thanks, I’ll take a look at these.

Thanks, but where do you recommend I store the scripts? Or should I use module scripts?

Thanks, do you know whether it would be better to use module scripts with functions for the different minigames?

1 Like

Everything should be contained to as few scripts as possible.

1 Like

Do you need a script or a actual way to organize the minigames? (Like an order or something along those lines)

I’m not a huge scripter, but I do believe I may be able to help you come up with a way to organize them.

Alright, thanks. So do you think just 1 module script would do?

More of how many scripts to use, or whether to use a module script, normal script, etc for each minigame. I’m thinking I’ll just go with 1 module script though.

I would use a module script to organize mini games. But thats me

1 Like

Yeah, thanks, I’ll use a module script.