Global datastore help

You can write your topic however you want, but you need to answer these questions:

  1. What do you want to achieve? Keep it simple and clear!

so I’m trying to make a clan system for my game. its basically where you create a clan and there’s a code with it and other people can join your clan with that code and then the clan will be saved to a database that holds all the information about the clan like the members of it

  1. What is the issue? Include screenshots / videos if possible!
    my issue is that I don’t know how to store all the clan information like when you create a clan I want it to be saved to a datastore. A lot of people say you should use datastore but I’m afraid that will not work since if there’s a lot of players and there all making clans it will be too much for the datastore too handle i need a way to save the data so it will work for this. and also most data store tutorials involve just saving player data like there coins I want it to save all the clans a player made. I don’t have a clue on doing both of these things.

  2. What solutions have you tried so far? Did you look for solutions on the Developer Hub?
    i have tried looking on the forums but the use cases there using it for is different than mine and i also cant find i clear answer for them. i also thought of saving all of this data under one key but it will probably not work when there is a lot of clans being made. I also tried looking into external databases like mongodb but the tutorials were way too confusing for me

DataStores are kinda difficult to throttle if you’re using your budget wisely. Assuming you have a limit of one clan per person and you create a limit of how many times someone can join a clan per minute, and are using pcalls to handle any errors, you should be ok.

Just don’t store each property of the clan to a different key, use tables (which is what you should be doing anyway).

See Error Codes and Limits

1 Like

Hey thanks for responding I just have one question though. Should if I do all of these limits should I keep all of this data under one key or like split it up

Like every single clan under a single key? No, probably not. If you have a lot of users, you’d probably reach the 4 mil character limit quickly. Each clan could probably get their own key but ensure things that belong to that clan (like the clan’s name, maybe its users, icon etc) are under a single key.

Oh ok thanks I’ll try that out

1 Like