game:BindToClose(function()
servers:UpdateAsync("servers", function(oldValue)
local newValue = oldValue or {} --oldValue might be nil
for i = 1,#oldValue do
if newValue[i].jobid == game.JobId then
table.remove(newValue,i)
break
end
end
return newValue
end)
end)
It isn't updating? When the server dies is there no time to update the datastore?
|