[Solved]
The button functions in the script is where it is broken, but I don't know what is wrong with it? Everything is named correctly..
This is what it should do... When you press one button, it closes all the other frames and only one frame should be visible (The frame linked to the button.)
How should I fix this and what is the problem?
--Club RoBeats Menu
--IntellectualBeing
--3/24/2014
-----------------------------------------------------------------
-----------[Main Variable Parents]-----------
local Core = script --LOL
local Main = script.Parent --The Mega Parent (Holds everything)
local OpenM = script.Parent.OpenMenu --Button Frame
local OpenB = OpenM.Open --Open Button
local Content = script.Parent.MenuContent --Holds all the stuff
local MenuTitle = script.Parent.Title --Pointless to have as a variable but okay.
--[Player Variables]--
-----------------------------------------------------------------
--Open Menu + A tween! Left to right going fast to slow then do it in reverse when closing.
--Button Functions
local btnFrameCombos = {
{
button = Content:FindFirstChild("About"),
frame = Content:FindFirstChild("AboutPage")
},
{
button = Content:FindFirstChild("Settings"),
frame = Content:FindFirstChild("SettingsPage")
},
{
button = Content:FindFirstChild("Staff"),
frame = Content:FindFirstChild("StaffPage")
},
{
button = Content:FindFirstChild("Inventory"),
frame = Content:FindFirstChild("InventoryPage")
},
{
button = Content:FindFirstChild("Updates"),
frame = Content:FindFirstChild("UpdatesPage")
},
{
button = Content:FindFirstChild("Songs"),
frame = Content:FindFirstChild("SongsPage")
},
{
button = Content:FindFirstChild("Donate"),
frame = Content:FindFirstChild("DonatePage")
},
}
local function showFrame(frame)
for i,v in ipairs(btnFrameCombos) do
v.frame.Visible = v.frame == frame
end
end
for i,v in ipairs(btnFrameCombos) do
v.button.MouseButton1Click:connect(function()
showFrame(v.frame)
end)
end

2 comments
@IntellectualBeing, there is nothing wrong with this code: "v.frame.Visible = v.frame == frame" - What that does is evaluate whether v.frame is frame. That evaluation results in a bool value which gets assigned to the Visible property of the current frame.
Okay.