Advertisement
DrawingJhon

Tween lol

Sep 3rd, 2020 (edited)
227
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.79 KB | None | 0 0
  1. --[[local part = workspace.Part
  2. game:GetService("TweenService"):Create(part, TweenInfo.new(5), {CFrame = CFrame.new(0, 50, 0)}):Play()]]
  3.  
  4. local TweenService = game:GetService("TweenService")
  5.  
  6. local part = Instance.new("Part", workspace)
  7. part.Anchored = true
  8. part.Position = Vector3.new(0, 1, 0)
  9. part.TopSurface = "Smooth"
  10. part.BottomSurface = "Smooth"
  11.  
  12. local info = TweenInfo.new(
  13.     4,
  14.     Enum.EasingStyle.Sine,
  15.     Enum.EasingDirection.Out,
  16.     1,
  17.     true,
  18.     0
  19. )
  20.  
  21. local goal = {
  22.     Position = Vector3.new(0, 50, 0)
  23. }
  24.  
  25. local Tween = TweenService:Create(part, info, goal)
  26. Tween:Play()
  27.  
  28. owner.Chatted:Connect(function(msg)
  29.     if msg:lower() == "/cancel" then
  30.         Tween:Cancel()
  31.     elseif msg:lower() == "/pause" then
  32.         Tween:Pause()
  33.     elseif msg:lower() == "/play" then
  34.         Tween:Play()
  35.     end
  36. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement