So i want it to bounce sideways when you hover over the gui. but the tween is slow and doesnt bounce
01 | for i,gui in pairs (script.Parent:GetChildren()) do |
02 | if gui:IsA( "Frame" ) then |
03 | gui.MouseEnter:connect( function () |
04 | gui:TweenPosition(UDim 2. new(-. 02 , 0 ,gui.Position.Y.Scale, 0 , "Out" |
05 | , "Elastic" ,. 5 , true )) |
06 | end ) |
07 | gui.MouseLeave:connect( function () |
08 | gui:TweenPosition(UDim 2. new(- 0.039 , 0 ,gui.Position.Y.Scale, 0 , "Out" |
09 | , "Elastic" ,. 5 , true )) |
10 | end ) |
11 | end |
12 | end |
EDIT: Changing the speed seems to do nothing
Lines 4 and 8 both have misplaced parenthesis:
01 | for i,gui in pairs (script.Parent:GetChildren()) do |
02 | if gui:IsA( "Frame" ) then |
03 | gui.MouseEnter:connect( function () |
04 | gui:TweenPosition(UDim 2. new(-. 02 , 0 ,gui.Position.Y.Scale, 0 ), "Out" |
05 | , "Elastic" ,. 5 , true ) |
06 | end ) |
07 | gui.MouseLeave:connect( function () |
08 | gui:TweenPosition(UDim 2. new(- 0.039 , 0 ,gui.Position.Y.Scale, 0 ), "Out" |
09 | , "Elastic" ,. 5 , true ) |
10 | end ) |
11 | end |
12 | end |
This should work, hope I helped!
I'm not sure if you did this already but here.
01 | for i,gui in pairs (script.Parent:GetChildren()) do |
02 | if gui:IsA( "Frame" ) then |
03 | gui.MouseEnter:connect( function () |
04 | gui:TweenPosition(UDim 2. new(-. 02 , 0 ,gui.Position.Y.Scale, 0.4 , "Out" |
05 | , "Elastic" ,. 5 , true )) |
06 | end ) |
07 | gui.MouseLeave:connect( function () |
08 | gui:TweenPosition(UDim 2. new(- 0.039 , 0 ,gui.Position.Y.Scale, 0.4 , "Out" |
09 | , "Elastic" ,. 5 , true )) |
10 | end ) |
11 | end |
12 | end |