Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Why won't my minimize text button script minimize anything?

I'm trying to make a minimize button that only minimizes the bottom parts and not the top, but my script isn't working...

local Minimized = false
script.Parent.MouseButton1Down:connect(function()
Minimized = true
script.Parent.Parent.OverLine1.Visible = false
script.Parent.Parent.UnderLine1.Visible = false
script.Parent.Parent.OverLine2.Visible = false
script.Parent.Parent.UnderLine2.Visible = false
script.Parent.Parent.Visible = false
script.Parent.Parent.MainBar.Visible = true
script.Parent.Parent.MainBarShadow.Visible = true
end)
if Minimized == true
	and
	script.Parent.MouseButton1Down:connect(function()
script.Parent.Parent.OverLine1.Visible = true
script.Parent.Parent.UnderLine1.Visible = true
script.Parent.Parent.OverLine2.Visible = true
script.Parent.Parent.UnderLine2.Visible = true
script.Parent.Parent.MainBar.Visible = true
script.Parent.Parent.MainBarShadow.Visible = true
Minimized = false

Thanks if you can help, also I'm kind of a noob so please go easy!

1 answer

Not totally sure what you were going for. This should always turn the MainBar to visible and turn the other gui's to the same as minimized

local minimized = false

script.Parent.MouseButton1Down:Connect(function()
	minimized = not minimized
	script.Parent.Parent.OverLine1.Visible = minimized
	script.Parent.Parent.UnderLine1.Visible = minimized
	script.Parent.Parent.OverLine2.Visible = minimized
	script.Parent.Parent.UnderLine2.Visible = minimized
	script.Parent.Parent.Visible = minimized
	script.Parent.Parent.MainBar.Visible = true
	script.Parent.Parent.MainBarShadow.Visible = true
end)

This discussion is preserved as it was. New answers, comments, and votes are closed.