Currently i make for every joined player a folder in server storage and load my data inside string values and int values but is this a good way to do it or is there a better one ?
Best way to store loaded data ?
1 answer
I just have a Data ModuleScript that handles everything internally. There's settings for each thingy so that leaderstats can be made to display certain bits of data... but everything for me is stored in a table in the script. And then to retrieve or modify information, BindableEvents/Functions would be used to communicate with it. (I never have a RemoteEvent/Function directly sourced to it). This way changes can be queued and saved effectively (i.e removing items from the saveQueue list that are in the queue again later but with a different value).
local dataSettings = {
{
Name = "Coins",
LeaderstatType = "IntValue", --optional
PlayerPointsCoefficient = 40, --optional & "pointsToAward = value * PlayerPointsCoefficient
IsOrderedData = true --whether to use normal DataStore
}
}
And I just run through this table creating stats n' stuff when a player joins.
local playerData = {}
newPlayer = function(plr)
playerData[plr.UserId] = IndvidualPlayersData
end
8 comments
https://www.roblox.com/library/989287701/Data-Handling-V4-0 Incomplete tbh but I still use it lel
And when the server starts my module just creates a table of all the actual datastores...... rather than retrieving them every time a player joins which would be BAD
But in my case i need to save items from a inventory is your methode capable to save that ?
You can't save Objects. You can only save Lua valuetypes
"pls halp mi saev BasePart, said every noob ever."
By the sounds if it you're probably not ready for the "Best way" to save data but neither am I probs....... Best to find something that works for you. Which is most likely described in the roblox wiki for you.
Il already made my savesystem and it works i just wanted to know or there is a beter way
Ah ok. Data compression is a biggie. Translating stuff into Hexadecimal or saving as tables is a good way about it.
This discussion is preserved as it was. New answers, comments, and votes are closed.

2 comments
It depends on the situation..
Its for an inventory