How do i make a single gui frame from an ancestry like the image be shown , frames are the actual containers , buttons are what is inside and no 2 frames should be visible at a time and i have an array with all the frame instances i just didnt know how to use it , and frame containers can be children of other frame containers
this is what i tried so far
main folder is the folder that has the buttons that show the main frames then theres buttons in those frames to show the child frames
The gui needs to be generated from file so it can be changed easily
ViewportAssets has the values that determine how the ancestry is generated
function ShowFrame(frame)
print(frame)
if frame.Parent == furnFolder then
ChangeMenu(true)
for i, v in pairs(furnFolder:GetChildren()) do
v.Visible = false
end
else
for i, v in pairs(furnFolder:GetChildren()) do
local Ancestor = frame:FindFirstAncestor(v.Name)
if Ancestor then
print(Ancestor.Name)
end
end
--for i, v in pairs(frame:GetChildren()) do
-- v.Visible = true
--end
frame.Visible = true
end
end
function ChangeMenu(bool)
mainFolder.Visible = not mainFolder.Visible
if bool and bool == true then
mainFolder.Visible = true
else
mainFolder.Visible = false
end
end