Datastore 2 Shutdown Glitch

So, recently i discover a bug from DataStore 2(not 100% sure)

Whenever we’ve shutdown servers in our game, players can’t get back and keeps in load screen for a long time

Essentially, when you try to rejoin the game after we shutdown all servers, your client gets stuck on this screen.

And the unique way to fix this is shutting down all the servers or migrate servers to the latest update, and after that we have to wait like +10 minutes to get back totally normal

ps: My game uses DataStore2 to save players data

I’ve made some researches and found this post having the same problem: Can't join games after shutdown

They think BindToClose() function is the problem, but i don’t think how can i fix this bc this function is very useful to save the players data, if someone have any solutions i’ll appreciate :smile:

(Sorry for bad english)

Which data store mode did you set for DataStore2? It should no longer be on OrderedBackups.

What do you mean by this?

This is one part of my datastore codes that i use:

local DataStore = require(game:GetService("ServerScriptService"):WaitForChild("DataStore2"))
local remote5 = game:GetService("ReplicatedStorage"):WaitForChild("RemoteNovos"):WaitForChild("pergunta")

local defaultValues = {

	Money = 0,
	Bank = 0,
	Rank = "None",

}

game.Players.PlayerAdded:connect(function(player)

	local folder = Instance.new("Folder", player)
	folder.Name = "SavedValues"

	for i, v in pairs(defaultValues) do
		if folder:FindFirstChild(i) then else
			if type(v)  == 'string' then
				local acessEquip = Instance.new("StringValue", folder)
				acessEquip.Name = i
			elseif type(v)  == 'boolean' then
				local acessEquip = Instance.new("BoolValue", folder)
				acessEquip.Name = i
			elseif type(v)  == 'number' then
				local acessEquip = Instance.new("NumberValue", folder)
				acessEquip.Name = i
			elseif typeof(v)  == 'Vector3' then
				local acessEquip = Instance.new("Vector3Value", folder)
				acessEquip.Name = i
			end
		end
	end

	local TableData = DataStore("ValoresIniciais", player)

	local function TableUpdate123123(updatedValue)
		local tablev = TableData:GetTable(updatedValue)
		for i, v in pairs(tablev) do
			if folder:FindFirstChild(i) then
				local acho = folder:FindFirstChild(i)
				acho.Value = v
			end
		end
		remote5:FireClient(player, "ValoreNeutre", tablev)
	end

	TableUpdate123123(defaultValues)
	TableData:OnUpdate(TableUpdate123123)

end)

No, in the DataStore2 module settings.

(also DataStore2 should be in server storage).

Actually my DataStore2 it isn’t in ServerStorage, but thanks for the tip!

idk if is this, but i think i’m using OrderedBackups

It only has one saving method? I’m not sure if that’s normal.

You need “Standard”.
image

ohh i think i’m using a old version of datastore 2

now i get a newer version

Do u think is better to change this to Standard?

Yes, they said Standard was better. Switch it and tell me if it works as intended.

Alright thank you so much i’ll check ur answer a solution.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.