print(game:GetService("DataStoreService"):GetDataStore("asdf"):GetAsync(1))
print(game:GetService("DataStoreService"):GetDataStore("asdf"):GetAsync(2))
game:BindToClose(function()
print("start")
game:GetService("DataStoreService"):GetDataStore("asdf"):SetAsync(1,false)
print("mid")
game:GetService("DataStoreService"):GetDataStore("asdf"):SetAsync(2,true)
print("fin")
end)
THIS WORKS IN GAME
In Accurate play solo, it gets stuck on the first SetAsync
(1,false) and the studio will yield until BindToClose times out (although it successfully saves it):