Any idea why my Button wont animate off the screen?
1 | script.Parent.TextButton.MouseButton 1 Click:connect( function () |
2 | script.Parent.TextButton:TweenPosition(UDim 2. new( 2 , 0 ,. 75 , 0 ) "Out" , "Quad" , 1 , false , nil ) |
3 | end ) |
Error:
1 | 00 : 52 : 45.912 - Players.dotProgram.PlayerGui.ScreenGui.Load.LocalScript: 2 : attempt to call a userdata value |
This will be due to the missing comma between UDim2.new(2,0,.75,0)
and "Out","Quad",1,false,nil
. Here's the fixed code:
1 | script.Parent.TextButton.MouseButton 1 Click:connect( function () |
2 | script.Parent.TextButton:TweenPosition(UDim 2. new( 2 , 0 ,. 75 , 0 ), "Out" , "Quad" , 1 , false , nil ) |
3 | end ) |