Hello, I haven’t used the DevForum in a while and recently had an issue. I’m starting to use DataStore2 as it seems to be much more reliable than regular DataStores. However, I recently started having an issue. Basically I have a table, in the format of [Object Name] = Multiplier (int) then do a for loop to create the objects and put them in a folder. I’m very confused on how to use DataStore2 to increment or add values to a specific value then update it. I’ve been trying to solve it for days and couldn’t get it to work. Any help or a source to point me in the right direction would be very appreciated.
Some sources I used to try and figure it out → Main DataStore2 Page, Another Post related to this, A video I watched to try and understand it
Thanks in advanced,
~Notrealac0unt
Let’s say that the name of your given store is MultiplierStore
.
local multStore = DataStore2("MultiplierStore", player)
-- You can increment the value of a store like this, if the store is a number.
multStore:Increment(5)
-- This will automatically handle everything you need for adding to that store.