for _, part in pairs(folder:GetChildren()) do
		if part.Owner.Value == player.Name then
			part.Parent = workspace:WaitForChild(player.Name.."savedata")
		end	
	end
	
	wait(1)
	local obj = workspace:WaitForChild(player.Name.."savedata")
	print(obj:GetChildren())
	
	local result, problem = pcall(function()
		BuildData:SetAsync(tostring(game.Players:FindFirstChildOfClass("Player").UserId), Save.Encrypt(obj:GetChildren()))
	end)

	if not(result) then
		error(problem)
	end

for some reason it keeps printing

  19:52:04.601  ServerScriptService.BuildHandler:44: ReplicatedStorage.Serializer:41: invalid argument #1 to 'pairs' (table expected, got nil)

but the print(obj:GetChildren()) part works. it prints a table with all its content.

3 comments

0

Can you show the entire script, both Server and Client? I'm curious.

0

What's with the encryption? It's totally overkill.

0

honestly i want to know how to save parts in a folder to one person