I’m trying to scale a frame to the exact position and scale as another frame. Seems pretty easy other then the fact the target scaled frame is parented inside a different frame and uses scale to determine its position and size. How can I achieve this without having to change the parent of the original frame?
local function openAppInterface(App)
local Interface = MainFrame:FindFirstChild(App.Name)
if Interface then
Interface.Position = App.Icon.Position
Interface.Size = App.Icon.Size
Interface.Visible = true
end
end
This is where AbsoluteSize and AbsolutePosition become useful.
Just replace the changes with position and size to absolute position and size.
Be careful though, as it’s read only. (That means we will want to set to Position and not AbsolutePosition, same goes for size)
And remember to use Offset, since it defines the size of the element in pixels.
Thanks for this, it’s getting somewhere but sadly it decideds to spawn just up of the target position. The scale seems to be fine however.
The target position is also located inside a from with a UiGridLayout which could be a factor. I’m not quite sure though but I’d thought I’d mean that as well.
Actually, disregard my previous post. I tried adding the AbsoluteCellSize Y value to the offset and it worked perfectly. Thank you so much for the help.