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

In that case, why did you contribute to the forum with your work as there is nothing that makes it more different than the current modules we have?

1 Like

When I first shared this module, it was bad and it had nothing that we can say good or usable. I was still developing and while developing I added session locking. I am still developing and want to add more features onto it, also I want to keep it simple while doing it. Whole modules main purpose is make data stores easier to use. From beginner to advanced.

1 Like

Well anyways, nobody can stop the person who is using this module, like can you even stop a beginner who found this module. He’ll instantly download and use it.

It’s all that person’s wish so now please stop with all these off-topic replies.

You can tell Zepharia that there are some bugs or glitches or the module isn’t working or its great feedback, anything but try not to be mean or rude.

2 Likes

Behavoir kind of matters in development as you try to get along with other developers,that can be one of the most powerful tool that might allow you to have a good reputation,having a bad reputation might-well,you can think of the negative effects. If you got any issues with the module or resources you can always point that out,but please do not harshly blindly blame something that was still in beta.

I have found this error:

I added in the line: local LuckyDataStore = require(6989257174) at the top of my leaderstats script and at the bottom, before the end, this line: local playerData = LuckyDataStore.CreateData(Player,“Test”,Cash)

Here is the leaderstats script: (ignore the bit about the own tycoon bit)

Am I meant to add anything else to the script or is it a bug with the module?

Have you properly checked the LDS API?

Here’s a link to the API

Just make a Default table I think?

You have made a small mistake, you don’t put cash variable there, you need to give a table.
Also you don’t need to put Cash.Value = 0 as it will put the default value itself.

local default = {
     Cash = 0
}
local playerData = LuckyDataStore.CreateData(player,"Test",default)
playerData:Combine(Cash) -- here you put variables

Edit: I will update the module to warn developer about they are not giving a table.
Edit2: I have updated module, source code and update log.

Is there a certain limit to how many values you can have and combine? I can’t seem to have over around three values before it starts saying got nil for the values on the combine line. It only returns nil to new values over around three.

There is no limit, can you show your code please?

There’s an end at the bottom for player added btw, it’s just not on the picture.

Interesting, I am not on my computer right now, I will look what is the issue when I get back to my computer and update this reply. Can you try parenting the folder after combine?

Yeah I’ll try parenting after the combine, give me one second

Still the same issues:

The issue is still on the combine line

Okay, I will look whats wrong, and are you using the latest version?

Yeah I’m running the latest version. It’s happened on older versions as well and on other games by me. I’ve tried workarounds to fix it but nothing seems to work. Thank you

Okay, thanks for reporting it. I am sorry about this error.

Hey, no problem. I should have reported it sooner but I thought it might have been on my end.

I think I know the issue, I saw that you have a HasBaseLights value in your table but not as a instance. Can you try making a HasBaseLights instance value or removing it from default table?

Edit: Also here is the code I have tested. I will go more deep on this error.

local LuckyDataStore = require(script.MainModule)

local default = {
	BlueprintsFilled = 0,
	HasDragPower = false,
	HasBaseLights = false,
	Slot1Name = "UNNAMED",
	Slot2Name = "UNNAMED",
	Slot3Name = "UNNAMED",
	Slot4Name = "UNNAMED",
	Slot5Name = "UNNAMED",
	FavoriteBlueprints = {},
}

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

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

	local BlueprintsFilled = Instance.new("IntValue",PlayerDataFolder)
	BlueprintsFilled.Name = "BlueprintsFilled"

	local HasDragPower = Instance.new("IntValue",PlayerDataFolder)
	HasDragPower.Name = "HasDragPower"

	local HasBaseLights = Instance.new("IntValue",PlayerDataFolder)
	HasBaseLights.Name = "HasBaseLights"

	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 = LuckyDataStore.CreateData(player,"StatsSave1",default)
	playerData:Combine(BlueprintsFilled,HasDragPower,Slot1Name,Slot2Name,Slot3Name,Slot4Name,Slot5Name)

	PlayerDataFolder.Parent = player

end)

Edit2: I have tried to recreate the error you got with using the same script but I couldn’t make it, instead of sending screenshot can you put the code here?

Here’s the whole script:

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

local Module = require(script.Parent.Datastore)

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

local DefaultPlayerStats = {

	BlueprintsFilled = 0,
	HasDragPower = "False",
	HasBaseLights = "False",
	Slot1Name = "UNNAMED",
	Slot2Name = "UNNAMED",
	Slot3Name = "UNNAMED",
	Slot4Name = "UNNAMED",
	Slot5Name = "UNNAMED",
	FavoriteBlueprints = {}
}

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

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

	local BlueprintsFilled = Instance.new("IntValue", PlayerDataFolder)
	BlueprintsFilled.Name = "BlueprintsFilled"

	local HasDragPower = Instance.new("StringValue", PlayerDataFolder)
	HasDragPower.Name = "HasDragPower"
	
	local HasBaseLights = Instance.new("StringValue", PlayerDataFolder)
	HasBaseLights.Name = "HasBaseLights"
	
	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, "StatsSave" , DefaultPlayerStats)
	PlayerData:Combine(BlueprintsFilled, HasDragPower, Slot1Name, Slot2Name, Slot3Name, Slot4Name, Slot5Name)
		
	--awardBadge(Player, 2124664630)

end)