I am trying to learn tweeninfo but I really don't understand the number when I make one, can someone explain it to me?
local TweenInfo = TweenInfo.new(what number would I put)
I am trying to learn tweeninfo but I really don't understand the number when I make one, can someone explain it to me?
local TweenInfo = TweenInfo.new(what number would I put)
If you scrolled to the bottom of the page, you would find this in the code example:
local tweenInfo = TweenInfo.new(
2, -- Time
Enum.EasingStyle.Linear, -- EasingStyle
Enum.EasingDirection.Out, -- EasingDirection
-1, -- RepeatCount (when less than zero the tween will loop indefinitely)
true, -- Reverses (tween will reverse once reaching it's goal)
0 -- DelayTime
)
The first number is the time in seconds that the tween goes from the current properties to the goals you set.
the EasingStyle is just how it transitions, linear would be smooth and constant, exponential would be slow at first and then sudden.
EasingDirection only really matters for looping and easing styles that have a non linear pattern.
Repeat count is how many times it will repeat on its own or until you stop it with code.
the boolean value just determines if the tween will go backwards when it completes a full cycle.
Delay is exactly what it sounds like, a delay in seconds.
If this answers your question, then mark it as accepted, if not, just let me know what you need further clarification on.
This is what I was confused about the numbers are hard to understand like this. This is why I need explanation on it but thank you
the comments explain it all, but I'll update my answer to explain further if possible.
This is what I needed thank you so much
This discussion is preserved as it was. New answers, comments, and votes are closed.
1 comment
The Dev Forum wasn't ant help