Error with checking if a datastore key exists

Gives same error as the function I already had

Are you sure you’re passing the key argument?

I’m running it like this:

DS.checkDataStoreExists("stats", player_name.."_stats")

Can I still check for keys in a datastore with this or only if a datastore exists. I apologize the title wasn’t very specific but im checking for keys.

Ohh I’ve mistaken your intent looool

I’ve never tried to list all keys in a datastore. So im unsure how to help

If you are checking for Keys, It would be DataStore:ListKeysAsync, but if you are trying to get the DataStore, I recommend using DataStoreService:ListDataStoresAsync instead of creating an Entirely new DataStore to do so.

Keep in mind, these function will Yield your code until they get a Response.

1 Like

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