Why does TweenService exist?

Why do we need an entire Service for something that could be realistically handled as a global library, or a method of another service.

For example, TweenInfo is a global, which returns a TweenInfo object, which is passed as the second parameter of the constructor for a Tween Object.

If we can have a TweenInfo global, why can’t we just have a Tween global with Tween.new(), and Tween.newInfo(), for example.

I am leaving out GetValue() yes, this second method is not reason enough to have an entire service dedicated, we can again use the Tween global, with Tween.newAlpha() for example.

Is/was this planned functionality? Was TweenService supposed to have properties, events, more methods?

10 Likes

TweenService exists because it does.

Roblox won’t remove it if you hate on it.

Just use it or don’t.

13 Likes

This goes into diffrent category.

4 Likes

That could be applied to a lot of things in the Roblox Engine; why have GuiService when StarterGui exists? Why have MemoryStoreService when DataStoreService exists?

From what I remember (and from what I’ve read), Roblox doesn’t want to create too many global libraries. If Roblox made a library for something like TweenService, they’d also likely make a library for something like DataStores (DataStoreOptions, DataStoreSetOptions, etc).

It’s also because TweenService:Create() returns a Tween Instance (which from what I can recall at the moment, no library returns an Instance for any methods), and the Tween Instance has methods and events built for it.

Just today they announced AccessoryDescription Instances for HumanoidDescription. Before, you needed to use tables, but now you can create one with Instance.new.

4 Likes

TweenService exists because making it it’s own syntax would have been a stupid choice.

I don’t know why you hate TweenService so much but just don’t. If you hate this then why not design it yourself huh?

3 Likes

Yes, they could have also made it so developers had to create their own camera, replication, and character systems… but they didn’t so it would be easier to make games.

its like saying “why does Debris exist?”, its there to be used and added on to in the future.

2 Likes

Why do we need an entire Service for something that could be realistically handled as a global library

That’s a silly complaint. Going by that logic, Roblox should not have services in the first place.

For example, TweenInfo is a global, which returns a TweenInfo object, which is passed as the second parameter of the constructor for a Tween Object.

If we can have a TweenInfo global, why can’t we just have a Tween global with Tween.new(), and Tween.newInfo(), for example.

Because TweenInfo is just a data type, just like Vector3 and UDim2.

3 Likes

Why does TweenService exist?

So we can Tween things… :thinking:

8 Likes

If you don’t like tween service remember there are people like me that use tween service and just because you don’t use it you shouldnt complain about it. Also this should be in a different category…

Debris is currently not recommended to be used, because it is less performant than using task.delay and :Destroy(), and it has a cap of 1000 instances

:upside_down_face:

There are things like this that roblox simply don’t maintain, even if updating it wouldn’t cause any backwards compatibility issues. Another example is ContextActionService, and the create mobile button parameter, it still creates mobile buttons in the old style, WHY WASN’T IT UPDATED TO THE NEW STYLE???

Don’t mind my little rant too much

1 Like

The problem with this perspective is that you’re assuming that the service isn’t handling any logic under the hood, as is just a container for methods and events.

I think this is unlikely the case due to the nature of what the service does (calculates animations based on time equations), which probably means that its ties your tweens to a lifecycle event when you play them.

I don’t believe this would be as efficient if each tween instance would be individually handling this logic by themselves, they’re probably all referenced back to the service, which would then do the calculations.

This wouldn’t be done by a traditional library, as libraries shouldn’t impose or run any code when requiring them. (and instead just be a container)

1 Like

That actually is a relatively decent question. The reason to that is on how Roblox Libraries are defined.

Libraries are groups of functions that you can use to manipulate built-in data types.

https://create.roblox.com/docs/reference/engine/libraries ^

Contrast that to Services which mainly impact actual Instances and other Roblox objects. For Instance the Players service is always returning players and such. TweenService create is used on Instances, therefore it makes sense to be a Service more than a library.


TweenInfo is defined as a DataType not a global, see: Roblox Engine Data Types | Documentation - Roblox Creator Hub

All Datatypes are generally created with .new()

Instance.new()
RaycastParams.new()
Vector3.new()
CFrame.new()
Color3.new()
TweenInfo.new()

And in turn get their own Keyword

4 Likes

Bruh. That is all I can say. No offense, but this might be the dumbest post on the developer forum that I’ve ever seen and read.

what did tweenservice do to you bruh :sob:

1 Like

i think it’s a fair question, most people on this thread are judging it from the title alone, and miss that what they’re really asking is “what determines if a module should be a service or a library?”.

2 Likes

TweenService is for smoother animations, as there is only you adjusting the speed and not your FPS.

I don’t use TweenService, because I don’t know how.

This is the worst take on this thread, why even respond?

You can tween things yourself, it’s just a handler for all things intepolation which gives you presets to work out of. Still no bezier support though.

It being a service provides easy usage, scalability, high performance and consistency. Afterall it creates object that needs to be controlled/stored somewhere.

2 Likes