The lists folder contains frames and each frame has all of the items of one category. The script.Parent (aka button for changing which list is shown) has the same name as the corresponding list. The problem? When I click a category (example - Tops), it hides all lists even the tops list. No errors in the output either. Thanks for any help
local Lists = script.Parent.Parent.Parent.Parent.Lists
script.Parent.MouseButton1Click:Connect(function()
Lists[script.Parent.Name].Visible = true
for _, object in pairs(Lists:GetDescendants()) do
if object:IsA("Frame") then
if object.Name ~= script.Parent.Name then
object.Visible = false
else
end
end
end
end)