Advertisement
Guest User

Untitled

a guest
Jul 27th, 2017
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.93 KB | None | 0 0
  1. local TweenService = game:GetService("TweenService")
  2. local part = script.Parent
  3.  
  4. local tweenInfo = TweenInfo.new(
  5. 7, -- Length of an interpolation
  6. Enum.EasingStyle.Elastic, -- Easing Style of the interpolation
  7. Enum.EasingDirection.Out, -- Easing Direction of the interpolation
  8. 5, -- Number of times the sequence will be repeated
  9. true, -- Should the sequence play in reverse as well?
  10. 2 -- Delay between each interpolation (including reverse)
  11. )
  12.  
  13.  
  14. while wait() do
  15. local propertyGoals =
  16. {
  17. Position = part.Position + Vector3.new(0,5,0)
  18. }
  19. local tween = TweenService:Create(part,tweenInfo,propertyGoals)
  20. tween:Play()
  21.  
  22. propertyGoals =
  23. {
  24. Position = part.Position + Vector3.new(0,-5,0)
  25. }
  26. tween = TweenService:Create(part,tweenInfo,propertyGoals)
  27. tween:Play()
  28. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement