As a Roblox developer, it is currently expensive, performance wise, to create dynamic Tweens, since we need to make a new Tween every time we want to change the targets or info.
Instance creation is expensive, and with tweens, every time you recreate one, you need to redo all the connections and logic to handle said tween, even just to change the targets table or TweenInfo contained in the tween object.
Instead, it should be possible to reuse Tween instances, simply by changing their target table and TweenInfo, as this would be more performant in games that use lots of tweens.
If Roblox were to address this issue, it would improve performance greatly, especially in games that rely on hundreds of tweens a second. Since Tweens are instances, they should be able to be changed after creation.
also it should be possible to save them but thats a different feature request
What exactly is the use case here? Whenever I’ve had to dynamically tween something I used the :GetValue() method, which I feel like was implemented exactly for those who want to tween properties without dealing with instantiation overhead.
This would require developers to completely re-implement everything that Tween instances currently do though, all to work around a problem which should be solved by Roblox already.
Tweens aren’t Instances, probably for this very reason. Neither is TweenInfo, for the record. This would be a little nice-to-have, but I don’t think it’s really necessary.
In my case, I actually have never been able to replicate performance issues with creating lots of tweens, even if I auto-click a button that makes six tweens every time it’s clicked (3 down 3 up) I straight up can’t even measure a difference in the framerate. I think this is because the thing that makes instance creation expensive is the memory allocation, and tweens are probably less memory intensive than most instances.
Though, despite saying that, I would still like this. I think it’s silly how we can’t just say, reference the created tween through like:
local ourTween = TweenService:Create(Part, TweenInfo, Table)
local NewTable = {
Color = Color3.fromRGB(255,0,0)
}
ourTween.GoalTable = NewTable
Even if the performance increase wouldn’t be noticeable for me, the general versatility of my code would go through the roof so either way this would be a good change for everyone.