Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --Initialize tween:
- TweenLib.newCFrameTween("test",--Tween name
- CFrame.new(),--Initial value
- function(cf) part.CFrame=cf end,--An optional function to update the items related to the tween, it's only purpose is to to be called by TweenLib.updateCFrameTweens
- 1--A number or function that specifies how long the tween should take, defaults to 1 if nothing is given.
- )
- --Tween to a CFrame:
- TweenLib.CFrameTween.test=CFrame.Angles(1,2,3)
- --Animate the tween(s) in the main loop:
- while true do
- TweenLib.updateCFrameTweens(tick())--call the 'update function' used in the initialization
- wait()
- end
- --Alternatively, you can obtain a freshly calculated value every time you index the table:
- part.CFrame=TweenLib.CFrameTween.test
Advertisement
Add Comment
Please, Sign In to add comment