Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

DataStore not getting Data and idk why?

Asked by 5 years ago

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

0
Connect not connect User#19524 175 — 5y
0
Does it matter? namerplz 42 — 5y
0
eh , you need to create a datastore for it using :GetDataStore maumaumaumaumaumau 98 — 5y
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 iSvenDerp 233 — 5y

1 answer

Log in to vote
0
Answered by 5 years ago

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!

Ad

Answer this question