Hello, I'm currently messing around with data store and trying to do things. The code I need help with is :
local ds=game:getService('DataStoreService'); local mds=ds:GetDataStore('0x111999555','main'); local ads=mds:GetDataStore('accounts','accounts_storage');
The error I get is : 15:38:00.590 - GetDataStore is not a valid member of GlobalDataStore 15:38:00.592 - Script 'Workspace.Script', Line 3 15:38:00.593 - Stack End
GetDataStore is only a method that can be used on the DataStoreService. On line 3, you are attempting to use this method on the GlobalDataStore "0x111999555". GlobalDataStores are stored inside of the DataStoreService; they are not the same thing. If you want to create ANOTHER GlobalDataStore, used the GetDataStore method on the service again, not the existing GlobalDataStore.
local ds=game:getService('DataStoreService'); local mds=ds:GetDataStore('0x111999555','main'); local ads=ds:GetDataStore('accounts','accounts_storage'); --Notice how ds is the DataStoreService, while mds is an existing GlobalDataStore. You want to run GetDataStore on DataStoreService, or ds rather than mds.
If I helped you, be sure to click the Accept Answer button below my character! :D