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 ?
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