Given the nature of DataStores, ideally you should want to get all the Player’s data at the same time – and cache it to a Table or something in your game for actual use.
But that’s besides the point. Looking at the DataStore documentation, those prefixes are actually the modern way of handling scopes! Personally I think this is a worse API than having the keys and scopes as fully separate values on the Lua side of things, but I digress.
Your usage of "UserID/Scope"
is fine, and I agree that it has better aesthetics, but the /
in that string has some actual syntactic meaning that affects how the data is actually stored under the hood! I have no idea what the performance differences would be if you flip the keys and the scopes, but the APIs (especially the List stuff!) is definitely simpler to use with the "Scope/UserID"
ordering.
Looked into it a bit more and you should definitely not use UserIDs as your scopes! If you want the reversed ordering, I’d just make a wrapper function that has the arguments in your preferred order and builds the correctly formatted key from that.