Advertisement
Remusutules

TweenUi

Sep 17th, 2024
27
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. local TweenService = game:GetService("TweenService")
  2.  
  3. local Button = script.Parent
  4. local Frame = Button.Parent
  5.  
  6.  
  7. local goal = {}
  8. goal.Position = UDim2.new(0.5, 0, 0.5, 0)
  9.  
  10. local TI = TweenInfo.new(
  11. 2,
  12. Enum.EasingStyle.Sine,
  13. Enum.EasingDirection.Out,
  14. 0,
  15. false,
  16. 0
  17. )
  18.  
  19. local tween = TweenService:Create(Frame,TI,goal)
  20.  
  21. Button.MouseButton1Click:Connect(function()
  22. tween:Play()
  23. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement