What I'm trying to do Basically, I'm giving a value to every player(potentially for some choosing-systems). Every player will have a different value, with none of them being the same for each player.
TLDR: Every player that enters their own ID + checking system for every player in a datastore.
Some pseudocode Most likely it would be like(This isn't LUA or if anything, a actual code. Just pseudocode).
1. Check if player enters in. 2. Let player enter a value in/(or)/ choose random value.. 3. Use datastores - get a list of every id. 4. Check through list if ID is in that datastore list/table 5. (Deny/Accept) player entry if ID is available.
I guess to dumb down the question would be "How would I create a table of datastores + add to it, and how would I find out whether a specific value exists in the datastore table?".
You could use playerID. Each player has a unique ID. For example:
local ds = game:GetService("DataStoreService"):GetDataStore("user_"..player.userId) ds:SetAsync(key, newValue)