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

Nothing is being printed out when a player leaves?

Asked by 5 years ago

Also, if I don't have the spawn(function() it will just take forever for the game to close (on studio) and save the players data. And once it has finally closed it would say "Not running script because past shutdown deadline (x247)"

01local DSS = game:GetService("DataStoreService"):GetDataStore("Testing")
02 
03local DefaultStats = {
04    Coins = 0,
05    Blocks = 0,
06    Rebirths = 0,
07}
08 
09local function load(player)
10    local key = "user_"..player.UserId 
11 
12    local success, data  = pcall(function()
13        return DSS:GetAsync(key)
14    end)   
15 
View all 82 lines...
0
Does it show on the output in errors? fortesss7 40 — 5y
0
DataStores are pretty tricky. Did you test it on a 2-player server? Tymberlejk 143 — 5y
0
The only errors it shows are that the data had been on a queue and that the script had passed shutdown deadline. I tried this in 2 player it says it saves but then it makes another datastore script not work. Raslito 7 — 5y

1 answer

Log in to vote
0
Answered by 5 years ago

you need to only allow the server to shutdown when data has been saved

0
So then.. what are you suggesting I do to the script? :/ Raslito 7 — 5y
Ad

Answer this question