Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

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

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

2 comments

0

I am guessing you want to tween the gui?

0

Yes

1 answer

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

1 comment

0

sorry for the 100 spelling mistakes its so difficult to type with mykyboard

This discussion is preserved as it was. New answers, comments, and votes are closed.