So, I have a DataStore that efficiently saves data from a given folder. For example, if the folder was named ‘Cars’ and had BoolValues with their .Name property being the CarName, the data saved would be this:
["Cars"] = ▼ {
["Camaro"] = false,
["Lamborghini"] = false,
["Audi"] = false,
["Tesla"] = false,
},
-- The table being saved currently. Works perfectly.
But I want to have properties of each car stored within the variable. In the end, I get this as the data about to be saved:
["Cars"] = ▼ {
["Camaro"] = ▼ {
["WindowColour"] = Color3.fromRGB(0, 0, 0)
["SuspensionHeight"] = 5
},
["Lamborghini"] = ▼ {
["WindowColour"] = Color3.fromRGB(0, 0, 0)
["SuspensionHeight"] = 10
},
["Audi"] = ▼ {
["WindowColour"] = Color3.fromRGB(0, 0, 0)
["SuspensionHeight"] = 8
},
["Tesla"] = ▼ {
["WindowColour"] = Color3.fromRGB(0, 0, 0)
["SuspensionHeight"] = 7
},
},
Unfortunately, when I try to save this, I get the error “Cannot store Dictionary in data store . Data stores can only accept valid UTF-8 characters.”
Is there a better way to save data like this?