I totally agree with this too, when I first wanted to write this I was thinking about using firebase databases for easier saving because HTTP service allows 500 requests per minute. Then I realized there are also limits for firebase too which were daily. I still wanted to write my own module and I am still working on to improve it.
Sorry to be of bother again but Iām here to report another issue. After I started using the updated model and the script youāve sent me before, there seems to be multiple errors. Every now and then in private servers the data will save and load and such, but sometimes itāll error.
I get this in the output:
It never did this before your recent update got pushed.
Well, thatās kind of weird. Zeph. really needs to figure out whatās up. Iāma check on the module on why itās happening.
I am aware of that issue, I updated it once more and it should not do that. I am still working on it to check for bugs but I am also working IRL and I generally donāt have much time. Also as I said earlier please require it with id so you always keep up to date.
Data hasnāt been saving correctly. I only get an error when trying to manually save and donāt get any overall. The data will load but it just wonāt save anything to the stats and when I rejoin, itās back to itās data I had before leaving.
EDIT: Iām confirming the data wonāt save at all, not just manually saving.
this is a nice group but what do we do here that is my question i,m not try to be rude ok just asking
All issues fixed, I couldnāt update the old model so I created a new model and updated the original post. Please take the new module there.
Please donāt send off-topic stuff, but here in this post, @Helyras has made a module for Data saving. And you can use it / reply about bugs and glitches and other stuff. Hope you get what I mean!
I was using the new model. I just re-required the new model again and itās still not saving data. Iāve also switched to using the script itself in game rather than requiring the model and itās still having the same issue. Iām using the script you sent me above so the format is 100% right. I can confirm this is happening every since you included the update to fix the Callback error around 17 days ago. The error got fixed but I think thatās when data quit saving.
Use this please.
Edit: Tested in the studio just a second ago and works.
local LuckyDataStore = require(7239753643)
-- sometimes requiring with id doesn't works maybe get the module manually
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,"PlayerData",default)
playerData:Combine(BlueprintsFilled,HasDragPower,Slot1Name,Slot2Name,Slot3Name,Slot4Name,Slot5Name)
PlayerDataFolder.Parent = player
end)
Okay, so I havenāt been on an update with this module so. Anyways, my main question.
Will you let us handle some parts of the module? So for example, if loading the data is success, we do something like
YourDataStore.SuccessfullyLoaded:Connect(function()
-- Stuff
end
Or
YourDataStore.ErrorOnLoadingData:Connect(function()
-- Stuff
end
Is it already possible? If not just a little bit of an idea for the module!
It is not possible currently but that is a great idea! Surely going to add them.
Iām having reason to believe it only saves when a value is changed in a public server and the player only joins back on the public server. Vip servers wonāt save when a new server is created. Thereās no reason for it not to save. Also you sent me this but a value is missing from the combine function and I changed the has values to true or false/bool values.
Isnāt Datastore2 better and easier to use than this, also the source code looks similar to the one from this tutorial.
I have talked with that guy personally too, session lock is implemented from that post and the topic owner knows that.
Okay, I will look what is wrong with it but my tests was all successfully working. Also, what do you mean a value is missing from combine function?
Hereās the new and updated code that doesnāt seem to save.
EDIT: I think it truly is only VIP servers that donāt save. Public servers 100% save.
-------------------- [[ VARIABLES ]] --------------------
local Module = require(script.Parent.Datastore)
-------------------- [[ SCRIPTING ]] --------------------
local Default = {
BlueprintsFilled = 0,
CompletedLavaQuest = false,
BaseWaypointToggle = false,
BlueprintLightToggle = 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 CompletedLavaQuest = Instance.new("BoolValue",PlayerDataFolder)
CompletedLavaQuest.Name = "CompletedLavaQuest"
local BaseWaypointToggle = Instance.new("BoolValue", PlayerDataFolder)
BaseWaypointToggle.Name = "BaseWaypointToggle"
local BlueprintLightToggle = Instance.new("BoolValue", PlayerDataFolder)
BlueprintLightToggle.Name = "BlueprintLightToggle"
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", Default)
PlayerData:Combine(BlueprintsFilled, CompletedLavaQuest, BaseWaypointToggle, BlueprintLightToggle, Slot1Name, Slot2Name, Slot3Name, Slot4Name, Slot5Name)
PlayerDataFolder.Parent = Player
end)
Iām confirming rn.
Data will NOT save in VIP servers
Data WILL save in public servers
Public:
Private:
I have updated the module, can you try again? Also added 2 events to give you guys more control over the module.
Still not saving in Private/VIP Servers. I tried the manual save before and got an error with argument 3 needing to be a table so I just deleted the manual save in the script.