TweenService questions?

Hello fellow developers. I have some few questions about the TweenService:
1 - Given the tween info. can i get the value that will be applied to a property at a specified timestamp.
something like:
variant GetTweenAt(float timestamp, variant from, variant to, TweenInfo tween_info)

2 - How to control the direction of tweening periodic properties. like rotation or cframes where the rotation can be interpolated either from right or left. to my knowledge, the direction is unexpected or one way, am not sure.

3 - Does changing the orientation and position using tweens. will respond to collisions? and if so, how i can control the position without altering the rotation for example:
i want to tween a part that will move along a path, but the orientation is fixed to looking at a 3d point in space.

4 - is there any ressources to learn how to make custom tweens from scratch to have full control over the workflow, like math, bezier curves and such things?

it will be so appreciated, if you can help me out with this !

EDIT:
If there is any modules that can provide me with the mathematical functions needed, or the functionality that i need. please make sure to share it with us!

2 Likes
  1. You cannot, as far as I know. Unless of course you make a table beforehand with all of the properties

  2. Rotation isn’t locked to one angle. If you rotate the y axis by 180 degrees, it will turn to the right, but if you rotate it my -180 degrees, it will turn to the left(or the opposite).

  3. If the part is anchored, it will not respond to collisions, if it is not, it might respond to collisions with the orientation.

  4. You can look on the developer hub, or search up “how to use TweenService” on the search bar. Optional, but you can turn on the filters for topics that are community tutorials and you’ll probably find one.

1 Like

well am talking specifically about the tween service functions. and if possible to make custom tweening using mathematical formulas
also for the first questions, i want to get the value that will be applied by the tween service at a specified duration of time.
like if it’s linear and it’s time is set to 1 second. and from = 2, and to = 4
then i wanted to get the tween value after 0.5 seconds. it’s obviously value = 3. but what about other tween types like sine, exponential and all of the other cool tween forms

also i’m a moderate scripter with 3 years of experience and i already read the whole wiki page about Tweens

I don’t know how they coded it, but you can just wait 0.5 seconds and set it as a variable.
So on one of my threads, I’ve asked a question and I think one of them just gave me a formula on the sine animation. I just have to find it now.


I’ve found it:

@bytechan is a genius.

4 Likes

yes that’s what am kind of looking for. because i’m designing a timeline editor. that needs to preview the tween at the specified timestamp.
unfortunatly i can’t find any module or tutorial for that :confused:

1 Like

Good luck on that! I’ve actually wanted answers for this, too. Maybe math isn’t a bad subject after all(from my research, it’s really, really complicated).

2 Likes