For most constructors with optional arguments such as Vector3.new()
, if you put nil
for one of the arguments, they will just substitute the default value for the nil
argument regardless the order.
However, with TweenInfo.new()
, you do not have to provide any/all arguments, as the remaining ones will be filled with default values, but if you manually put nil
for them, for example, because you want a default value for EasingStyle
but not EasingDirection
without explicitly typing the default value, an error is raised, instead of using the default value, even though according to the documentation, the types for the arguments are optional.
Expected behavior
Examples:
-
TweenInfo.new(nil)
should be equivalent toTweenInfo.new()
but raises an error instead. -
TweenInfo.new(1, nil, Enum.EasingDirection.InOut)
should be equivalent toTweenInfo.new(1, Enum.EasingStyle.Quad, Enum.EasingDirection.InOut)
but again, raises an error instead.