Table being some weird abomination after being updated by remoteEvent

Yeah, the title says it all.

Heres what it prints out:

[1] = "M16",
                    [2] = "Longsword",
                    [3] = "Iron Pickaxe",
                    [4] = "",
                    [5] = "",
                    [6] = "Iron Pickaxe",
                    [7] = {},
                    [8] =  ▶ {...},
                    [9] = 1000,
                    [10] = {},
                    [11] =  ▶ {...},
                    [12] = "",
                    [13] =  ▶ {...},
                    [14] = {},
                    [15] =  ▶ {...},
                    [16] = {}

Here is the default data:

				["Cash"] = 1000,
				["EquippedWeapons"] = {
					"M16",
					"Longsword",
				},
				["EquippedPickaxe"] = "Iron Pickaxe",
				["EquippedArmor"] = "",
				["EquippedAccessories"] = {
					
				},
				["EquippedAura"] = "",
				["EquippedBackAccessory"] = "",
				["EquippedTeleporters"] = {
					
				},
				["EquippedMiscItems"] = {
						
				},
				["GeneralEquippedItems"] = {
					"M16",
					"Longsword",
					"Iron Pickaxe"
				},
				["EquippedButtons"] = {
					"M16_1",
					"Longsword_2",
					"Iron Pickaxe_3"
				},
				["Inventory"] = {
					"M16",
					"Longsword",
					"Iron Pickaxe",
				},
				["Portals"] = {
					"The Caves",
				},

What’s updating it:

	local plrData = data[plr.UserId]
	
	if plrData then
		local tableOfStuff = game:GetService("HttpService"):JSONDecode(httpThig)
		print(httpThig)
		table.clear(plrData.EquippedButtons)

		for i, newEquipepdButtonName in pairs(tableOfStuff) do
			table.insert(plrData.EquippedButtons,newEquipepdButtonName)
		end
	end

Im also changing it like this;

--Unequip

			table.remove(data[plr.UserId].GeneralEquippedItems,table.find(data[plr.UserId].GeneralEquippedItems,selectedItem.Name))
			table.remove(data[plr.UserId].EquippedButtons,table.find(data[plr.UserId].EquippedButtons,selectedButtonInItemFrame))
			
			if plr.Character:FindFirstChild(selectedItem.Name) then
				plr.Character[selectedItem.Name]:Destroy()
			elseif plr.Backpack:FindFirstChild(selectedItem.Name) then
				plr.Backpack[selectedItem.Name]:Destroy()
			end

It also updates and does the function above that. I am sending a JSONEncode thing since the table is being goofy.

Remove the JSONEncode. It’s not necessary, and it wouldn’t fix the table being weird anyways. Also, are you sure that nothing modifies the table before it is sent? What code fires the remote event?

Yes I am quite sure, nothing is modified on the client and the server prints out the table as that thing. Here is the code from the Gui controller.

		if plrData then
			local newTable = {}
			
			for i, button in pairs(inventoryItemFrame.Items:GetChildren()) do
				if button:IsA("TextButton") then
					print(button.Name)
					if table.find(plrData["EquippedButtons"],button.Name) then
						table.insert(newTable,button.Name)
					end
				end
			end

			if newTable then
				saveDataButtonEvent:FireServer(HttpService:JSONEncode(newTable))
			end
		end

Client ^

The arrows with the 3 dots in brackets may be something you could expand and see the contents.

Yeah I did. It just seems to be some random things

This will insert stuff into the numeric indices, hence why your table is different. Again, remove the JSONEncode, it won’t help anything.

I removed the JSON. It also noticed that the table is how I want it to be on the client, but it’s different on the server.