LuckyDataStore - An Easy to Use Saving Module with Session Locking and Auto-Saving

Are you sure that you are getting the right module? Because model has been changed and I have already made tests in private servers and it was working all fine.

Yeah, I’m using the one that got updated the 5th of this month. I don’t get any errors at all, it just doesn’t seem to save in private servers.

Okay, please send the code you are using and check that if the module you are using matches the source code in the post. As I stated before I tested with the code you sent just above this messages and it was all working fine. Old model is replaced by a new one, for some reason when I publish an update it wasn’t updating the model.

local StoreData = DataStore.CreateData(Player, "ExtraData")
local PlayerData = StoreData.Data
local Notifications = PlayerData.Notifications

Everything is already created in another module using a default table. Nothing errors in it. It’s when I’m trying to get the current data. I couldn’t find anything else in the API that could help.

1 Like

There is another function for getting existing data, FindData. I forgot to update the API my bad.

Hey I’m coming back to this because I really want it fixed. Have you found out the way to fix private server data not saving? Public servers will save data and such but private servers won’t save when leaving them and coming back to a private or public.
My Code:

-------------------- [[ VARIABLES ]] --------------------

local Module = require(script.Parent.Parent.Modules.Datastore)

-------------------- [[ SCRIPTING ]] --------------------

local Default = {
	Slot1Name = "UNNAMED",
	Slot2Name = "UNNAMED",
	Slot3Name = "UNNAMED",
	Slot4Name = "UNNAMED",
	Slot5Name = "UNNAMED",
	Notifications = {"Notification From Game Developer: Welcome!"},
}

game.Players.PlayerAdded:Connect(function(Player)

	local PlayerDataFolder = Instance.new("Folder")
	PlayerDataFolder.Name = "PlayerData"
	
	local Slot1Name = Instance.new("StringValue",PlayerDataFolder)
	Slot1Name.Name = "Slot1Name"

	local Slot2Name = Instance.new("StringValue",PlayerDataFolder)
	Slot2Name.Name = "Slot2Name"

	local Slot3Name = Instance.new("StringValue",PlayerDataFolder)
	Slot3Name.Name = "Slot3Name"

	local Slot4Name = Instance.new("StringValue",PlayerDataFolder)
	Slot4Name.Name = "Slot4Name"

	local Slot5Name = Instance.new("StringValue",PlayerDataFolder)
	Slot5Name.Name = "Slot5Name"

	local PlayerData = Module.CreateData(Player, "ExtraData", Default)

	PlayerData:Combine(Slot1Name, Slot2Name, Slot3Name, Slot4Name, Slot5Name)

	PlayerDataFolder.Parent = Player
end)
1 Like

This is old but did this get fixed?

Nope, it’s still an issue. I think the creator has left this project.

1 Like

Hello! Sorry for the long delay. I had IRL events and couldn’t be able work on the module. Going to look at your issue right now. Again, sorry for the delay.

EDIT: I just made a test in a private server with the code you have given to me, there is no problem about the code. You can also test that on a place you created with creating a free vip server. There must be something else that is making the code not work as intended. Are you using CreateData function more than once? CreateData function must be used only once per player. Then you need to call FindData function to get their existing data.
Can you share your other codes that uses modules functions to get whats making it not work as intended?

Here is my test about the problem. This was tested in a newly created game and a free vip server.
(PS: I made the folders name leaderstats to test it easier.)

Glad to see you back! I understand.

And nope the CreateData event is only referenced once. It’s weird. Data will save on Public Servers 100% every time but Data will NEVER save on private servers even if I try to force save it using the script. It only started doing this to me when you updated and fixed the Callback error. Scrolling up in the topic here I can see that’s when I first told you about the issue. There’s nothing off about my code and I’ve sent it to you multiple times and used your code you’ve sent me but it still doesn’t work.

No other scripts in my game use the Find or CreateData function. They all just change the values on the server and I expect the values to save themselves when someone leaves. It’s just weird how it won’t save in Private Servers but will in Public.