01 | local float = true |
02 | while float = = true do |
03 | gui.back.title:TweenPosition(UDim 2. new( 0.114 , 0 ,- 0.151 , 0 ), "Out" , "Quad" , 1 , true ) |
04 | wait( 1 ) |
05 | gui.back.title:TweenPosition(UDim 2. new( 0.114 , 0 ,- 0.101 , 0 ), "Out" , "Quad" , 1 , true ) |
06 | wait( 1 ) |
07 | end |
08 |
09 | gui.back.button.Activated:Connect( function () |
10 | float = false |
11 | end |
This is because you have to do the binding first then the while loop:
1 | while wait() do |
2 |
3 | end |
4 |
5 | print ( "This will NEVER print because of that while loop" ) |
Instead this would be much better:
1 | print ( "Now we can print what we want and run the loop" ) |
2 | while wait() do |
3 |
4 | end |
Your code never reaches
1 | gui.back.button.Activated:Connect( function () |
2 | float = false |
3 | end |
because it gets caught in the loop. Move your connect function before the loop starts.