01 | local ts = game:GetService( "TweenService" ) |
02 | local part = script.Parent |
03 |
04 | local ti = TweenInfo.new { |
05 |
06 | 6 , --Length |
07 | Enum.EasingStyle.Elastic, --Easing style |
08 | Enum.EasingDirection.In, --easing style direction |
09 | 2 , --Amount of times the tween will repeat |
10 | true , --If the tween will repeat |
11 | 3 --Delay between the tweens |
12 | } |
13 |
14 | local partprop = { |
15 | Size = Vector 3. new( 25 , 25 , 25 ); |
Error: TweenInfo.new first argument expects a number for time.
For some reason, I get that error and can't really see what I did wrong not sure if I'm blind or not
The error is coming from an unintended side effect of the language I assume you aren't aware about. You don't actually need parentheses to pass an argument to a function:
1 | print "magic!" |
And in your case, the argument you're passing to TweenInfo.new
is a table:
1 | TweenInfo.new { |
2 | ... |
3 | } |
4 |
5 | -- That's the same as doing this, which is incorrect! |
6 | TweenInfo.new( { ... } ) |
You'll need to replace those curly brackets {}
with parentheses ()
to correctly pass your arguments.