Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

DataStore not getting Data and idk why?

Link for pastebin It's 200 Lines long But it's cause there is two saving functions But maybe it could be https or api error i'm not sure

4 comments

0

Connect not connect

0

Does it matter?

0

eh , you need to create a datastore for it using :GetDataStore

0

Hi, to answer your question to the comment above, you should use Connect instead for several reasons... connect is deprecated and Roblox could eventually remove the command and your scripts would break, it also makes your code look cleaner and its just more efficient. I recommend that you get into the habit of using Connect

1 answer

Hi, what's up.

So immediately I recognized an error, and it most likely is the cause to all of this. On line #1, you put > local Datastore = game:GetService("DataStoreService")

This get's the service DataStoreService, but not the DataStore itself. :SetAsync() and :GetAsync() are only available to DataStores, and not the service. In order to fix this, you'd need to think of a DataStore name, and change the first line a bit.

 local Datastore = game:GetService("DataStoreService"):GetDataStore("DataStoreNameHere")

-- the datastore name could be absolutely anything

Hope this helps!

This discussion is preserved as it was. New answers, comments, and votes are closed.