Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local TweenService = game:GetService("TweenService")
- local TweenSpeed = 2
- local TweenData = TweenInfo.new(TweenSpeed, Enum.EasingStyle.Linear)
- local TweenData2 = TweenInfo.new(2, Enum.EasingStyle.Bounce)
- local EndPoint = Vector3.new(54, 0.5, 121)
- local StartingPoint = script.Parent.Position
- local XValue = StartingPoint.X + ((StartingPoint.X-EndPoint.X)/2)
- local YValue = StartingPoint.Y + ((StartingPoint.Y-EndPoint.Y)/2)
- local ZValue = StartingPoint.Z + ((StartingPoint.Z-EndPoint.Z)/2)
- local MidwayPoint = Vector3.new(XValue,YValue,ZValue)
- local Goal = {}
- Goal.Position = MidwayPoint
- local Goal2 = {}
- Goal2.Position = EndPoint
- local Tween1 = TweenService:Create(script.Parent,TweenData,Goal)
- local Tween2 = TweenService:Create(script.Parent,TweenData2,Goal2)
- Tween1:Play()
- --realized that when using .Completed it comes to a complete halt before starting the second.
- wait(TweenSpeed-0.5)
- Tween2:Play()
Advertisement
Add Comment
Please, Sign In to add comment