Returning nil With :UpdateAsync() Doesn't Act Like :RemoveAsync()

Hello, I’ve been using DataStoreService:UpdateAsync(Key) for a while, even tho I had never tried returning nil in the callback function. But when I did, I noticed that it just changes nothing of the data instead of acting like :RemoveAsync(Key) which would remove the data under the key provided. Is there something else I should do, or is it that :UpdateAsync() is pointless at what I’m trying to accomplish and I need to use :RemoveAsync() which would push me into using 2 data store functions?

Yeah according to the documentation if your transform function returns nil, the UpdateAsync call will cancel so this is intended behaviour. You’d need to switch to :RemoveAsync

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.