Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

invalid argument #2 (UDim expected, got number) Tween Parameters FIx?

Asked by
Jo1nts 134
3 years ago

Error on line 11, (slider:TweenPosition)

local gui = script.Parent.Parent
local frame = script.Parent
local slider = frame.slider
local page = frame.page 

for i,object in pairs(frame:GetChildren()) do 
    if object:IsA("TextButton") then
        object.Text = object.Name

        object.MouseButton1Click:Connect(function()
            slider:TweenPosition(UDim2.new(object.Position.X, object.Position.Y + 0.026),Enum.EasingDirection.Out, Enum.EasingStyle.Elastic,0.5,true)
        end)
    end
end
0
I am guessing you want to tween the gui? IshmaelKGaano 6 — 3y
0
Yes Jo1nts 134 — 3y

1 answer

Log in to vote
0
Answered by 3 years ago

From my own knowledge and memory, easingstyle comes first before easing direction, s swap their positions.

ALSO udim2.new has 4 paramertres (x,xoffset,y,yoffset) and u only put 2

0
sorry for the 100 spelling mistakes its so difficult to type with mykyboard Gmorcad12345 434 — 3y
Ad

Answer this question