This is in a localscript, in a TextButton named MenuButton MenuButton is in a ScreenGUI named NewGUI The game has Filtering Enabled turned on.
script.Parent.MouseButton1Click:connect(function(clickedMenu) if clickedMenu then script.Parent.Parent.Frame:TweenPosition(UDim2.new(0, 0,0, 0) 'Out' , 'Quint', 1) script.Parent.Parent.Frame:TweenPosition(UDim2.new(0.19, 0,0.45, 0) 'Out' , 'Quint', 1) elseif script.Parent.Parent.Frame.Position == '0, 0,0, 0' then script.Parent.Parent.Frame:TweenPosition(UDim2.new(-0.17, 0,0, 0) 'Out' , 'Quint', 1) script.Parent.Parent.Frame:TweenPosition(UDim2.new(0, 0,0.45, 0) 'Out' , 'Quint' , 1) end end)
After testing, and clicking, noting happens.
You've done it wrong. I fixed the script, see what you've done wrong.
local clickedmenu = false script.Parent.MouseButton1Click:connect(function() if clickedmenu == false then script.Parent.Parent.Frame:TweenPosition(UDim2.new(0, 0,0, 0), 'Out' , 'Quint', 1) script.Parent.Parent.Frame:TweenPosition(UDim2.new(0.19, 0,0.45, 0), 'Out' , 'Quint', 1) clickedmenu = true elseif clickedmenu == true then script.Parent.Parent.Frame:TweenPosition(UDim2.new(-0.17, 0,0, 0), 'Out' , 'Quint', 1) script.Parent.Parent.Frame:TweenPosition(UDim2.new(0, 0,0.45, 0), 'Out' , 'Quint' , 1) clickedmenu = false end end)