Datastore:UpdateAsync(plr.UserId, function(oldVal)
local newValue = oldVal or 0 --In case there is no old value, set it to 0
newValue = newValue + 1 --Add 1 to whatever
return newValue
end)
That’s it. Just return a value from the transform function and that value will be saved. It’s just like SetAsync but with a function instead of data.