Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local TweenService = game:GetService("TweenService")
- local part = script.Parent
- local tweenInfo = TweenInfo.new(
- 7, -- Length of an interpolation
- Enum.EasingStyle.Elastic, -- Easing Style of the interpolation
- Enum.EasingDirection.Out, -- Easing Direction of the interpolation
- 5, -- Number of times the sequence will be repeated
- true, -- Should the sequence play in reverse as well?
- 2 -- Delay between each interpolation (including reverse)
- )
- while wait() do
- local propertyGoals =
- {
- Position = part.Position + Vector3.new(0,5,0)
- }
- local tween = TweenService:Create(part,tweenInfo,propertyGoals)
- tween:Play()
- propertyGoals =
- {
- Position = part.Position + Vector3.new(0,-5,0)
- }
- tween = TweenService:Create(part,tweenInfo,propertyGoals)
- tween:Play()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement