Dictionary containing arrays for crafting system resulting in error

I am currently producing a crafting system which uses the following array to get the ingredients and then the amount of that ingredient from a dictionary.

Here’s the dictionary

Resources = {
	["WoodPlanks"] = {"Logs", "", "", 1, "",""},
}

The “” Are blank and are recognised in code to be empty since this variable only uses 1 log to craft.

Here is where the error is coming up,

function CheckCraft()
	for i,v in next, script.Parent.ScrollingFrame:GetChildren() do
		if v:IsA("TextButton") then
			v.MouseButton1Click:Connect(function()
				Ingredient = script.Parent.IngredientTemplate
				Ingredient.Line1.Text = Resources[v.Name[1]].." x "..Resources[v.Name[4]]

And here is the error I am getting.

I believe arrays cant be used in a dictionary but if any of you can help out or even suggest a better idea, I’m all ears

I think it should be like this

function CheckCraft()
	for i,v in next, script.Parent.ScrollingFrame:GetChildren() do
		if v:IsA("TextButton") then
			v.MouseButton1Click:Connect(function()
				Ingredient = script.Parent.IngredientTemplate
				Ingredient.Line1.Text = Resources[v.Name][1].." x "..Resources[v.Name][4]

v.Name is a string and trying to make a string behave like a table, (v.Name[1]), returns nil.

I think its down to the [1] part not being able to be used in dictionaries, testing before it works using code like this

local AmountRequired = 1
function CheckCraft()
	for i,v in next, script.Parent.ScrollingFrame:GetChildren() do
		if v:IsA("TextButton") then
			v.MouseButton1Click:Connect(function()
				Ingredient = script.Parent.IngredientTemplate
				Ingredient.Line1.Text = Resources[v.Name].." x "..AmountRequired

This works just fine.

local Resources = {
	["WoodPlanks"] = {"Logs", "", "", 1, "",""},
}

for _ , resourcetype in pairs(Resources) do
	for i = 1,#resourcetype do 
		print(resourcetype[i])
	end
end

There error looks like it’s finding your string data, but not Ingredient.Line1.Text