So I am starting to use Datastore 2 and I want to try to save every color (or texture) for a car so I tried creating this dictonary but it looks like I cannot go into Cars, then add a mustang for example and give it some sub informations.
@VegetationBush (Mentioning because replying results in an ISE, which is currently being investigated)
The indice of 1 in the UserData table is nil and the second lookup will throw an exception for attempting to perform a lookup on a nil indice. Numerical index lookups only work when you are working with an array or you explicitly use numerical indices.
ClockworkSquirrel’s lookups are the proper way to do this. That is, you can access the table either through chained lookups (the proper way) or dot syntax (syntactic sugar). Valid examples of this in practice as code blocks:
local mustangData = UserData["Cars"]["Mustang"]
local mustangData = UserData.Cars.Mustang
That depends on your implementation. I recommend you consult documentation and try debugging this code for yourself to understand why it’s not working first, as this is probably an issue you’ll be able to resolve by picking away at it a bit.
Saying that something doesn’t work without providing context makes it difficult for me to respond properly as well. There’s always a reason why something doesn’t work and you should always look into it and provide information rather than just saying it doesn’t work.