This is in a localscript, in a TextButton named MenuButton MenuButton is in a ScreenGUI named NewGUI The game has Filtering Enabled turned on.
1 | script.Parent.MouseButton 1 Click:connect( function (clickedMenu) |
2 | if clickedMenu then |
3 | script.Parent.Parent.Frame:TweenPosition(UDim 2. new( 0 , 0 , 0 , 0 ) 'Out' , 'Quint' , 1 ) |
4 | script.Parent.Parent.Frame:TweenPosition(UDim 2. new( 0.19 , 0 , 0.45 , 0 ) 'Out' , 'Quint' , 1 ) |
5 | elseif script.Parent.Parent.Frame.Position = = '0, 0,0, 0' then |
6 | script.Parent.Parent.Frame:TweenPosition(UDim 2. new(- 0.17 , 0 , 0 , 0 ) 'Out' , 'Quint' , 1 ) |
7 | script.Parent.Parent.Frame:TweenPosition(UDim 2. new( 0 , 0 , 0.45 , 0 ) 'Out' , 'Quint' , 1 ) |
8 | end |
9 | end ) |
After testing, and clicking, noting happens.
You've done it wrong. I fixed the script, see what you've done wrong.
01 | local clickedmenu = false |
02 |
03 | script.Parent.MouseButton 1 Click:connect( function () |
04 | if clickedmenu = = false then |
05 | script.Parent.Parent.Frame:TweenPosition(UDim 2. new( 0 , 0 , 0 , 0 ), 'Out' , 'Quint' , 1 ) |
06 | script.Parent.Parent.Frame:TweenPosition(UDim 2. new( 0.19 , 0 , 0.45 , 0 ), 'Out' , 'Quint' , 1 ) |
07 | clickedmenu = true |
08 | elseif clickedmenu = = true then |
09 | script.Parent.Parent.Frame:TweenPosition(UDim 2. new(- 0.17 , 0 , 0 , 0 ), 'Out' , 'Quint' , 1 ) |
10 | script.Parent.Parent.Frame:TweenPosition(UDim 2. new( 0 , 0 , 0.45 , 0 ), 'Out' , 'Quint' , 1 ) |
11 | clickedmenu = false |
12 | end |
13 | end ) |