Hi, is it possible to pass through a blank parameter in
TweenInfo so that parameter will be set to the default??
This is kinda what I mean but this doesn’t work
Is it possible, or do I have to type the parameter each time I decide to use TweenInfo but only modifying the
Hmm… I don’t think you can (dont take my word on that im no pro scripter, however i tried
... it only occurs errors) but the default TweenInfo is;
You can’t leave arguments between 2 arguments as you said but you can leave the end ones. So:
TweenInfo,new(1, _, Enum.EasingDirection.Out)
The best way to approach this would to be to create a base function which would inherit the same features as the TweenInfo.new() function, but remove a variable:
local function TweenInfo2(Length, EasingDirection): TweenInfo
return TweenInfo.new(Length, Enum.EasingStyle.(style), EasingDirection)
But worse comes to worst, just add the parameter just in case.
Set the Parameter as
nil, however doing this will just set it another value, which for
EasingStyle will default to
I highly doubt you tested this before posting this answer LOL.
fyi it errors
Whoops, It was actually setting the value to
0 that did that, but anyway.
local t = TweenInfo.new()
t.Time = 2
t.EasingDirection = Enum.EasingDirection.In
TweenInfo will have specific set values, you just modify them after creating the
TweenInfo.new(x, 0, y, z)
Set your Data on the
TweenInfo while ingoring the one you want want using
0 which will set it as
EasingStyle, however for the boolean, you cant use a number.
0 actually sets it to the corresponding enum that has the value
EasingStyle, this is
Linear, and for
EasingDirection, this is
Please read my post correctly as i did not state that.
I need to sleep, my brain does not work today