Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Trying to save placement of furniture over DataStore and I am getting Error 104; what is the issue?

game.Close:Connect(function()
	local saveFolder = workspace.placedFurniture
	local saves = saveFolder:GetChildren()
	local saveFurnitureTable = {}
	for i = 1, #saves do
		local save = {}
		save["folderName"] = saves[i].Name
		local furniture = saves[i]:GetChildren()
		for i = 1, #furniture do
			save[furniture[i].Name] = furniture[i].PrimaryPart.CFrame
		end
		saveFurnitureTable[i] = save
	end
	local Success, Error = pcall(function()
      return game:GetService("DataStoreService"):GetDataStore("SAVE"):SetAsync("Furniture", saveFurnitureTable)
	end)
	if Error then
		warn(Error)
	end
end)

Output as requested. 104: Cannot store Array in data store. Data stores can only accept valid UTF-8 characters.

2 comments

1

Can you show the output.

0

Put the only thing appearing in output up there

1 answer

I think the problem is that you cannot save instances in DataStore. (Parts, Models, Tools, etc.) Instead, you have to save all the info of the model. (CFrame, Size, etc.)

1 comment

0

All it is saving is the name of the folder (unique to each player who places furniture) that the model is in, the model's name, and the model's primarypart cframe though?

This discussion is preserved as it was. New answers, comments, and votes are closed.