Why I can't do this on "TweenSizeAndPosition"

Consol: Argument 2 missing or nil

local _Udim2 = UDim2.new
local debounce = 0.025

local changeKey_Down = {_Udim2(0.854, 0,0.84, 0), _Udim2(-0.941, 0,1.252, 0), Enum.EasingDirection.Out, Enum.EasingStyle.Linear, debounce}
local changeKey_Up = {_Udim2(0.937, 0,0.933, 0), _Udim2(-0.941, 0,1.159, 0), Enum.EasingDirection.Out, Enum.EasingStyle.Linear, debounce}

changeButton:TweenSizeAndPosition(changeKey_Down) -- Consol Error
task.wait(debounce)
changeButton:TweenSizeAndPosition(changeKey_Up)

but this is work. I don’t know why

changeButton:TweenSizeAndPosition(_Udim2(0.854, 0,0.84, 0), _Udim2(-0.941, 0,1.252, 0), Enum.EasingDirection.Out, Enum.EasingStyle.Linear, debounce) 
task.wait(debounce)
changeButton:TweenSizeAndPosition(c_Udim2(0.937, 0,0.933, 0), _Udim2(-0.941, 0,1.159, 0), Enum.EasingDirection.Out, Enum.EasingStyle.Linear, debounce)
1 Like

Could you please inform us on which line the console states there is a missing argument?

1 Like

This is not how you use TweenSizeAndPosition, its multiple arguments instead of passing in a table.

see documentation:

changeButton:TweenSizeAndPosition(changeKey_Down) – Consol Error

c_Udim2(0.937, 0,0.933, 0)
Why is there a β€˜c_’ here?