Performance difference between Tween:Cancel() and Tween:Pause()?

After learning about Tween:Cancel() and Tween:Pause() I was just wondering if there was any performance difference between the two, even in the slightest as I intend to use them a lot. Both work for what I’m trying to accomplish, which is to disable the looping tween of a GUI when moving to a different menu.

They both have different uses. Not sure about the performance difference but I would say cancel as it wouldn’t retain the goal positions and progress in memory (maybe). But if you don’t need the tweens anymore you could just destroy them.

Tween:Cancel cancels the tween and puts the object’s properties back to where they were before the tween started whereas Tween:Pause pauses the tween, if resumed it will continue to the goal as if nothing had interrupted it.

Ooh neat I didn’t know tweens could be destroyed. Yea I was sorta leaning towards Tween:Cancel() due to the possibility of removing memory, I appreciate the help!

1 Like

Tweens are instances. You could even parent the tween to an object if you wanted! You would never need to parent a tween though, it would be a last resort to trying to give another script access to the same tween.

1 Like

I’m pretty sure Tweens parent property is locked just like AnimationClips (or that’s what I think :LoadAnimation() returns)

1 Like

I’ve parented it before, just for fun. :LoadAnimation() returns an AnimationTrack.

2 Likes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.