LocalScript:

local gui = script.Parent
local b = gui.text.TextButton
local open = false 
gui.Frame.Visible= false

b.MouseButton1Click:connect(function()
	if not open then
		gui.Frame.Visible=true
		gui.Frame:TweenSize(UDim2.new(0, 400, 0, 200))
		wait(.2)
		open = true
		for i,v in pairs(gui.Frame:GetChildren()) do
			v.Visible = true
			
		end
	elseif open then
		gui.Frame:TweenSize(UDim2.new(0,0,0,0))
		wait(.3)
		open = false
		for i,v in pairs(gui.Frame:GetChildren()) do
			v.Visible = false
			
		end
		gui.Frame.Visible=false
	end
end)

What it's supposed to do: Gyazo Hierarchy: Gyazo

If you can offer any help thanks, I'm receiving no errors at all.

2 comments

0

Have you tried using "print()" to see where it stops working?

0

Try using a pcall.