DataStore not loading table

Hello!
I was making a CFrame data store that had multiple dictionaries in it and it won’t load the dictionaries into the module. Please Help!

script:

function module:LoadGameData(newMap)
	local GameData = require(game:GetService("ServerScriptService").Modules.GameData)
	local DataStore = game:GetService("DataStoreService"):GetDataStore(GameData.ServerCode)
	local Players = game:GetService("Players")
	local Http = game:GetService("HttpService")
	local tries = 3
	local Resources, Rocks, Trees
	local succ, err

	local function Get()
		local count = 0
		repeat
			succ, err = pcall(function()
				Resources = DataStore:GetAsync("Resources")
				if newMap == false then
					Rocks = DataStore:GetAsync("Rocks")
					Trees = DataStore:GetAsync("Trees")
				end
			end)
			count += 1
		until count >= tries or succ

		if not succ then
			warn("Failed to load Server:"..GameData.ServerCode.." kicking all players...")
			warn(err)
			for i, v in pairs(Players:GetPlayers()) do
				v:Kick("\n\n Failed to load Server. kicking all players - Rejoin to load back. \n\n")
			end
			return
		end
		if succ then
			if newMap == false then
				if Resources and Trees and Rocks then
					return {Resources, Trees, Rocks}
				else
					return {
						{
							["Wood"] = GameData.Wood,
							["Iron"] = GameData.Iron,
							["CitizenCount"] = GameData.CitizenCount,
							["Coal"] = GameData.Coal,
							["Gold"] = GameData.Gold,
							["Food"] = GameData.Food,
							["Water"] = GameData.Water,
							["Stone"] = GameData.Stone,
						},
						{["Rocks"] = GameData.Objects.Rocks},
						{["Trees"] = GameData.Objects.Trees}
					}
				end
			else
				if Resources then
					return {Resources}
				else
					return {
							["Wood"] = GameData.Wood,
							["Iron"] = GameData.Iron,
							["CitizenCount"] = GameData.CitizenCount,
							["Coal"] = GameData.Coal,
							["Gold"] = GameData.Gold,
							["Food"] = GameData.Food,
							["Water"] = GameData.Water,
							["Stone"] = GameData.Stone
					}
				end
			end
		end
	end

	local function Set()
		local Values = Get()
		local count = 0
		local succ, err
		local Resources = {
			["Wood"] = GameData.Wood,
			["Iron"] = GameData.Iron,
			["CitizenCount"] = GameData.CitizenCount,
			["Coal"] = GameData.Coal,
			["Gold"] = GameData.Gold,
			["Food"] = GameData.Food,
			["Water"] = GameData.Water,
			["Stone"] = GameData.Stone,
		}
		local Rocks = GameData.Objects.Rocks
		local Trees = GameData.Objects.Trees
		Resources.Wood = Values.Wood
		Resources.Iron = Values.Iron
		Resources.CitizenCount = Values.CitizenCount
		Resources.Coal = Values.Coal
		Resources.Gold = Values.Gold
		Resources.Food = Values.Food
		Resources.Water = Values.Water
		Resources.Stone = Values.Stone
		if newMap == false then
			Rocks = Values.Rocks
			Trees = Values.Trees
		end
		repeat
			succ, err = pcall(function()
				DataStore:SetAsync("Resources", Resources)
				if newMap == true then
					DataStore:SetAsync("Rocks", Rocks)
					DataStore:SetAsync("Trees", Trees)
				end
			end)
			count += 1
		until count >= tries or succ

		if not succ then
			warn("Failed to Set Server:"..GameData.ServerCode)
			warn(err)
			return
		end
		warn("\n\n Game Data Has Loaded or Been Set! No Errors At All! Woohoo! \n\n")
	end
	Set()
end

Are you trying to save a CFrame? If so, that is impossible. Datastore only accepts strings, numbers and bools (there are probably more but I am VERY certain you can’t save CFrame and Vector3).

I am converting it, lol I didn’t show all the code

local function CFrameToTable(cf)
		return {cf:GetComponents()}
	end
	local function TableToCFrame(t)
		print(t)
		return CFrame.new(table.unpack(t))
	end

I believe it is possible. Use the parser from Rerumu. If you’re considering this parser, use the encode and decode functions.