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

Why isn't my table in DataStore saving?

Asked by 4 years ago
Edited 4 years ago
01local DataStoreService = game:GetService("DataStoreService")
02local DataStore = DataStoreService:GetDataStore("coinsDataStore")
03 
04game.Players.PlayerAdded:Connect(function(plr)
05    local data
06    local success,errormessage = pcall(function()
07        data = DataStore:GetAsync(plr.UserId.."-data")
08        if data then
09        else
10                data = {0,1}
11        end
12        print("Got data")
13    end)
14 
15    if success then
View all 60 lines...

I am trying to get the datastore but it seems it doesn't load in. I have API services in Studio.

0
IF its server you don't need to use wait for child marine5575 359 — 4y
0
It is in the server, but it still doesn't seem to save CrypxticDoge 135 — 4y

Answer this question