The error was [16:58:30.967 - 104: Cannot store Array in data store. Data stores can only accept valid UTF-8 characters.]
> local Remote = game.ReplicatedStorage.Remotes
local Save = Remote.Save
local Load = Remote.Load
local DataStore = game:GetService("DataStoreService")
local Store = DataStore:GetDataStore("Store", 1)
local ItemTable = {}
Save.OnServerEvent:Connect(function(Player, Folder)
for i,v in ipairs(Folder:GetDescendants()) do
if v:IsA("Part") then
print(v.Parent.Name)
print(v.CFrame)
table.insert(ItemTable, 1 ,{v.CFrame, v.Parent.Name})
Store:SetAsync(Player.UserId.."Items", ItemTable[1])
end
end
end)
Load.OnServerEvent:Connect(function(Player, Folder)
for i,v in ipairs(ItemTable) do
print(v)
end
end)
Correct. That’s basically what serialization is. But the CFrame class doesn’t have
.x, .y, .z properties. It has a .Position, an upVector, a rightVector and a lookVector.