You can write your topic however you want, but you need to answer these questions:
What do you want to achieve? My game is heavily based on the involvement of players and fighting, therefore I want there to be gangs that players can create and join in.
What is the issue? I understand scripting and that it would require datastores, but I am stuck thinking about one thing. I want to make it so that players can’t make the same gang name if it is already taken, but I am confused as to how I would do this. Would I datastore on the server and then save it once it shuts down? But then, wouldn’t this save over other server’s datastores if they shutdown?
What solutions have you tried so far? I have looked at other devforum posts about factions and gangs, but I haven’t seen any considering the idea of a gang name being taken.
I am not asking for code. I am asking for a general idea or direction to head in, specifically about the gang names.
Use global data store, so you could check if that name exists already, and use it to give errors/warning such as 'this name already exists, please rename it.`
Save it both when they leave the game, and when the server is down, by using bindtoclose
The solution really depends on your case, how do you know what gangs exist in the server, if your displaying them then I mean you have access to them somehow.
On a side note: If I remember correctly your not allowed/supposed to have gangs in Roblox games, however, games such as Emergency Response: Liberty County, use mafias instead (lol)
If Server A saves data to a key once it shuts down, and then Server B saves to the same key, wouldn’t it overwrite it?
Or would I have to make it so that once Server B shutdowns, it gets the data from the datastore, appends its own data onto it, and then saves to the key?
Do datastores update fast enough for that to be viable?
When a user creates a gang/faction, check if the name exists. If it does, don’t make the faction and let the user know that the name is takes. If it isn’t, create a new key under the name of that faction.