So I challenged myself with creating my own tool system in place of the native roblox one, and funnily enough the biggest problem I've come across so far is animations. Whenever I select a tool, the tool slot GUI performs an easeOutBack tween to a larger size. Whenever the slot is deselected, the tool slot GUI performs an easeOutSine tween to its default size. The problem I have is when these animations interrupt each other, like if a player were to spam selecting and deselecting a tool. Since the easing functions are not inverse, switching between them is not as simple.
I would like to note that I am calculating my own tweens every frame instead of using roblox's tween service for added control.
For simplicity's sake, the variable progress will refer to progress along the tween measured as delta time / time and the variable alpha will refer to progress towards the goal size of the GUI object as a function of progress. To smooth transitions between tweens, I want alpha to remain constant between tweens so that the size of the GUI doesn't drastically change. I would also like progress to remain constant between tweens, so that the tweens look consistent and they don't jitter after they are cancelled. Finally, I would like the duration left in the tween to be measured as Original Tween Duration * progress so that a tween which is immediately replaced doesn't take an eternity to return to its goal position when the distance is relatively short.
I hope this question makes sense. If you need any additional information, I would be happy to provide it.
