Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

What does the number mean when you use tweeninfo?

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)

1 comment

0

The Dev Forum wasn't ant help

1 answer

✓ Accepted answer

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.

3 comments

0

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

0

the comments explain it all, but I'll update my answer to explain further if possible.

0

This is what I needed thank you so much

This discussion is preserved as it was. New answers, comments, and votes are closed.