Is it just me . . . OR CAN YOU NO LONGER STORE THESE?

So recently I have been coding data stores, Every time I try to save a dictionary this happens,

104: Cannot store Dictionary in data store. Data stores can only accept valid UTF-8 characters.

Why is this happening??? Ive been storing the same things all this time but now this is happening!!
Is this some new roblox update? How do I fix it? What in the world is going on?

What I'm storing

local characters = {}

	for _, character in pairs(player.Profile.Characters:GetChildren()) do -- save characters ------------------------------------------------------------------------
		local characterFolder = { -- put character data in a table
			
			owned = character.Owned.Value,
			
			-- character values
			vUnlocked = character.VUnlocked.Value,
			VEquipped = character.EquippedV.Value,
			
			
		}
		
		characters[character.Name] = characterFolder
	end
	
	
	local currentData = { -- the data im storing,
		gems = profile.Gems.Value,
		enhanceTokens = profile.EnhanceTokens.Value,
		
		chars = characters, -- all the characters data
		equippedChar = player.Profile.Character.Value.Name,
		
	}
9 Likes

Are any of the values you are saving instances within your game?

3 Likes

Oh I just realized! One of the values is a OBJ value! Is this the case on why its not working?

3 Likes

That’s correct. Before saving, you’ll need to serialize the properties of that instance.

7 Likes

serialize the entire table with HTTPService.JSONEncode and also HTTPService.JSONDecode to deserialize. this makes the things in the datastore take less space anyway

3 Likes

What sort of data stores do you use ? OrderedDataStore or DataStore ?

3 Likes

i use both in conjunction with each other (the ds2 method). it basically just removes data loss entirely with like a 0.0001% chance of losing data, and even if you lose it you still get reverted back to a previous version instead of starting all the way over.

2 Likes

For everyone that is here, Im pretty sure this is the answer, I just havent actually checked yet so . . .

2 Likes