New Tween Function: Tween:Reset()

As a Roblox developer, it is currently too difficult to restore tweened objects to their initial state. I need this so I can create:

  • An elevator that gets sent back to the floor when no one is on it anymore
  • A grappling hook that instantly returns to its initial position if it doesn’t hit a grabable object
  • Cannonballs that instantly return to the cannon after flying too far without hitting anything

To implement these, currently I have to store the objects’ initial states in a script, and then apply them when I want to restore the initial state. This is not a good enough solution because non-experienced developers might be too daunted with the task of figuring out how to save them into an easily-accessible format. Even if I use a module where my code would be about the same as with the feature implemented, it’s not a good enough solution because it wouldn’t be very convenient to newer developers or those who don’t know about it. I would like Roblox to handle this automatically, as it would improve my development experience by making it much more convenient and less time consuming to make my own function for it.

Adding a Reset method to Tween would allow me to accomplish this automatically. I expect Roblox to keep track of the object’s original properties at the start of the tween, and when I call Tween::Reset, the object instantly snaps back to its initial state.

13 Likes

Would come handy, though I personally think it doesn’t take that much effort to store the initial position (unless you have a lot of them, of course)

2 Likes

I guess that could be useful for beginners because you could tween multiple properties and it might get annoying to store the different values, but I don’t think it’s important enough that I’d want it as a feature.

Someone could make a module for this kind of thing so that it tweens and can also reset to help non experienced developers.

2 Likes