DataStore with lots of values

for name, value in pairs(House) do
		if typeof(value) == "Instance" then
			
			local InventoryValues = Instance.new("BoolValue")
			InventoryValues.Name = InventoryValues
			InventoryValues.Value = value
			InventoryValues.Parent = PlayerValues
			
		elseif typeof(value) == "string" then
			
			local new = Instance.new("StringValue")
			new.Name = name
			new.Value = value
			new.Parent = PlayerValues
		end
	end

This only creates a HouseName and not any bool values? So sorry if I’m being dumb.

	for name, value in pairs(House) do
		
		if typeof(value) == "table" then
			
			local InventoryValues = Instance.new("BoolValue")
			InventoryValues.Name = "InventoryValues"
			InventoryValues.Value = value
			InventoryValues.Parent = PlayerValues
			
		elseif typeof(value) == "string" then
			
			local new = Instance.new("StringValue")
			new.Name = name
			new.Value = value
			new.Parent = PlayerValues
		end
	end
1 Like