How can i make a Ban system?

So where’s the main datastore? Are you not going to have one unlike most games do?

What? You are making no sense.

To use datastore you still have to do the same thing. Get the datastore service then get the datastore using the name you want to call it. I don’t get where you are coming from?

The “BanStore” datastore IS ONLY designed to store bans NOT main data.

Not it isn’t. If you wanted you can set main data if you wanted to. It is just the name of a datastore.

You can call it ‘MainData’ and still set bans to it. It really doesn’t matter. It is only the datastore name

Yeah sure I can store main data with this
image
declaring it as just a boolean value.

I mean you can still use that datastore to set anything it really doesn’t matter. You can store peoples leaderstats if you wanted to by just doing

BanStore:SetAsync(Player.UserId, {LeaderstatName = '', LeaderstatAmount = ""})

No you can’t you’ll just override the boolean lol, also that code has a syntax error.

Ye in that situation. But I was just saying the datastore only has a name. It can be used for anything. Ik it would override the boolean if you were to do that. But you would just create another datastore to save anything else. It wouldn’t be inefficient at all.

What do you mean it isn’t inefficient? “just create another datastore”. From this , I can infer that you’re using 2 datastores therefore 2 datastore must be loaded which IS inefficient.

You can’t set multiple data to the same datastore for the same person if you have bans as well so obviously you got to have multiple datastores. He might not even have to dave data other than ban data so technically I am right in saying he is only using one which is what I was saying in the first place

Yes you can? Just have one datastore which saves a table with an index holding a boolean value.

OK ye but it is also more efficient for developers to have it all inseperate datastores. No game I’ve ever worked on or seen over the devfourm use one data store for everything. That is just inefficient for developers. But what I was getting to was not about this but was that he is only using one datastore there not multiple.

Describe a scenario where 2 or more datastores will be more efficient than one. (excluding backup datastores)

I mean tbf if you are creating a temporary ban system that auto removes after a ban is over it would be better to have it in a separate datastore otherwise it would remove all data that is saved under the tables in the datastore without having to create more sets of code to faff setting the other data which would also be quite inefficient for both the datastores and the programmers etc.

Easier? More like inefficient and a hindrance. You can just set the boolean as false in the “Ban” index of the main datastore table.

Anyways, he is right tho. The system checks if the player.UserId is into the database if he/she is they get kicked/banned from the game and if not the function returns and nothing will happen. Only the guy needs to make his own system.

That doesn’t save over games? Also your point about using multiple data stores; no, I only used one and it was just an example

So why was your example so specific to just a boolean? Are you assuming no other data will be saved within the game because that’s just irrational. Furthermore, your example doesn’t involve methods of temporary bans as it can only store a boolean.