I want to access my Halloween Datastore inside my Main datastores that manipulates Exp, Cash, Level,Items,Etc.
Is there a way i could do this?? I have been trying reading through the forums and see no clear solutions.
the design is very human
DataStoreService:GetDataStore("DataStoreName")
just that and i’ll get another datastore?
you won’t get another datastore,
omg idk how to explain it
datastore in 1 game is like, it can be accessed in any server script in said game
so let’s say you have:
- script 1:
something something
get datastore
- script 2:
something something
get data store (will not create a new datastore, instead it'll just fetch the existing one)
Do i have to load the data again in Script 2 or is there a particular way on doing it?
it’s just the typical datastore thing
GetAsync, SetAsync and UpdateAsync
Assuming you’re using user-specific keys for your data, I’d recommend using a single script to load/save that data and caching it in a table/dictionary then allowing other scripts to get the information through the use of bindable/remote events or functions. Using GetAsync every time you need to retrieve some information isn’t the most efficient if you’re able to avoid it.