Place frame just below another frame

After that, you should include more details if you have any. Try to make your topic as descriptive as possible, so that it’s easier for people to help you!

local Frame ="Frame")

local P = script.Parent.Position
local S = script.Parent.Size
local A = script.Parent.AnchorPoint

Frame.Parent = script.Parent.Parent
Frame.Size = S
Frame.AnchorPoint = A
Frame.BackgroundColor3 =, 0, 0)

Frame.Position = P -, 0, P.Y.Scale - P.Y.Scale, 0)

Here I leave how I would like it to be


Why dont you use UiListLayout?

because they will be some frames that will be generated and I will also use tween position, for which I cannot use UiListLayout

1 Like

You have to get the y scale of the frame and then divide by 2 (assuming the AnchorPoint for the Frame is in the center) then add that to the Y position of the frame. Something like:

Frame.Position = UDim2.fromScale(0, P.Y.Scale + (S.Y.Scale / 2))

Just wanted to add, you can do this pretty easy by making the new frame the child of the old frame. Just make sure that the position is set to {0, 0},{1, 0} and anchor point is 0,0

and if you wanted the new frame to be the same size as the old one, you would make the size of the new frame {1, 0},{1, 0}

Not sure if making the new frame a child of the new frame is an option for you in this circumstance, but it would work.

It’s a quick and simple way, but unfortunately for the work I’m doing it’s not convenient to do it, but thank you very much anyway :smiley:

1 Like