Is there a proper way to tween a ui

im trying to tween the position of the ui by the y axis

here is the code

PlayMenu:TweenPosition(UDim2.new(FramePositions.List.PlayMenuPos.In), "In", "Quad", .5, true)

I’ve actually quite did some research before posting and it still doesn’t work

1 Like

does it let tween numbers inside a table if not then how to unpack a table?

i did everything i can but i cant fix it

if anybody can come here to tell me how to fix it it appreciate it for now imma just do it tommorow again

TweenPosition is used for tweening a GUI object to selected UDim2 position. Example:

PlayMenu:TweenPosition(UDim2.new(0,0,0,0)

You have to declare: xScale,xOffset,yScale,yOffset.

Is the “In” a GUI? FramePositions.List.PlayMenuPos.In If so, you can do:

PlayMenu:TweenPosition(FramePositions.List.PlayMenuPos.In.Position, "In", "Quad", .5, true)

there is no udim2 so thats why im using it

also its a dictionary with numbers

it has 4 offsets and scale inside a table

Let me clarify something, you can only enter a UDim2 value for this purpose, ie. it has to be a UDim2.new(). You cannot use a table.

i tried but still no luck i need a fix to it

You said FramePositions.List.PlayMenuPos.In is a table right?

it is a number dictionary containing udim values

You cannot provide UDim2.new with a dictionary like you did here:

UDim2.new(FramePositions.List.PlayMenuPos.In)

Instead make FramePositions.List.PlayMenuPos.In a UDim2 value:
FramePositions.List.PlayMenuPos.In = UDim2.new(1,0,1,0) or whatever values you are using.

well i did that method and it still didn’t work

Are you sure you’ve got the values right? Also would you mind sharing the whole code?

Yes, is it a GUI? Otherwise you will have issues!