DataStore2 Saving

Hiya there.

Not sure if this is a dumb question but I’ve recently gotten into using DataStore2. I’m just curious if there’s anyway to save a datastore not specific to a player, or if not possible, is there a way I can get the datastore2 value of the player without having them ingame, using an ID or something like that?

If that didn’t make sense, here’s it shortened.

I need to do one of two things, either is fine.

  1. Be able to save a DataStore2 to a non specific player, I’m doing this because I have a bank system I’m creating, there’s specific player banks, and one global bank for a specific team used to pay players. I need to be able to update and save the global banks amounts.
  2. Instead of globally saving it, I can just make an alt account and have those values save to it. But of course my alt can’t always be ingame, so is there a way I can update and change their values if not ingame?

Use leaderstats and the old-fashioned Roblox way of using DataStores

There are tons of tutorials on YouTube!

yes, it’s possible. you’re not saving datas to the player but instead, you’re saving datas to the server and using the player id as a key so you can re-access it using their id again. it’s like a table, something like this

local data = {
    [key] = "data"
}

so when you want to access the data again, you can just re insert the key.

for example, if you want to make a data for the whole game then you won’t need to use the player id to save them but instead any key you want (something like “serverBankGlobalAmount” instead of playerid), and then when you resync the datastore to the server and use that key, you can now access the data you saved to the data store without using any player.

i hope you understand this. im bad at explaining, lol.

I’m not quite sure I understand fully… Is there anyway we can get in contact over discord if you have it, and discuss this further? It’d really help.