How do I set arguments to their default value in TweenInfo?

How would I declare TweenInfo with parameters 2 & 3 set to their default values?
It should be something like this right?

local tweenInfo = TweenInfo.new(
	1,
	nil,
	nil,
	0
)

In theory, the first parameter (the time it takes to tween) is 1 second, and the fourth parameter (repeatcount) is 0 times.
and then parameters 2 & 3 are set to their default value, but this doesn’t happen!

These are the default values I’m talking about (right column)
image

What am I doing wrong?

If you don’t give an argument they will become default values
You can do this

local tweenInfo = TweenInfo.new(1)

Sorry, I forgot to clarify…

The reason I want to do this is so I can easily pass through the default values for parameters 2 and 3, and then set my own values for parameters after that.

local tweenInfo = TweenInfo.new(
	1,
	nil,
	nil,
	0
)

You can’t. The way a TweenInfo is constructed doesn’t give you “skips” for later values. You must specify them.

So you’re telling me I have to manually type out

local tweenInfo = TweenInfo.new(
	1,
	Enum.EasingStyle.Quad,
	Enum.EasingDirection.Out,
	0
)

Every single time?

Yes. TweenInfo wasn’t thought to use tables, if it was you could’ve skipped the Enums.

ain’t big of a deal realllllyyy…

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.