Hello! I’ve been trying to make a Clicker game using Datastore2. The problem is that when incrementing or setting multiple times a second, it sometimes skips over the line and doesn’t set or increment at all.
I’ve tried using spawn(function() in hopes of solving this issue but that did nothing. It would happen whilst auto-clicker is enabled, as it is incrementing multiple times a second.
Rebirth part:
spawn(function() datastore2("clicks", player):Set(0) end) datastore2("gems", player):Increment(rebirthAmount, 0) datastore2("rebirths", player):Increment(rebirthAmount, 0)
Clicker part:
datastore2(“clicks”, player):Increment(1 + datastore2(“rebirths”, player):Get(0), 0)