What’s going on, this is my current code. I’ve had this problem on two occasions, I have three different datastore2 save values, every time I make a fourth one it breaks and says it’s nil.
Here’s the code i’m using, trying to increment it.
The “RebirthLvl” is what is “nil” and/or broken.
The other DS2 Save Variable isn’t in that function, but I have four in this script.
If RebirthLvl has never been assigned before, it will be nil. In your case, DataStore:Increment cannot increment nil by 1 (nil isn’t a number).
If you look at the DataStore2 API documentation, you will see that it accepts 2 arguments. The first argument is the number to increment by, the second is an optional default value you can provide. E.g. DataStore:Increment(1, 0) will check if data already exists, if not then increment from the second argument (0) to be 1.