How do I make a string inside a table determine a value?
I thought I could do it like this:
But I just got errors all across.
Script:
local conversionRate = {}
local function getConversionRates(player)
local size = 0
local items = {
"Box",
"Bag",
"Can",
"Furniture",
}
local trash = player.Character.Trash:GetDescendants()
for _, descendant in pairs(trash) do
if descendant:IsA("Folder") then
for _, item in pairs(items) do
if item == descendant.Name then
end
end
end
end
end
return conversionRate