Getting position of GUIs in a scrollingframe canvas

Hello. I am trying to make a “quick-search” system.
In this color picker, players can select a color by pressing one of the many colored buttons. If they scroll away, I want them to be able to click
and have the scrolling frame automatically scroll to the selected buttons position.
Here is the code I currently have. (Everything works in the code except getting the position of the identified button.)

function load()
	local list = script.Parent.Parent.Parent.colors
	local selection = script.Parent.Parent.Text
	local s = list:FindFirstChild(selection)
	if s then
		local xpos = s.Position.X.Offset
		list.CanvasPosition =,0)


I have already found the problem. I am using UIListLayout, which completely disables the position property of the GUI object inside of the scrolling frame.

Now, I need to figure out another solution that will let me get the position of the GUI inside of the scrollingframes canvas.

Try using GUI.AbsolutePosition

That gets the gui position according to the players screen, not the scrolling frame.

Are you using offset to position your UI?

Label each frame 0 to the # of frames. 0 being the first frame and # frames being the frame farthest away. Do spaceBetweenEachFrame * position and position being what you labelled it. Add this number to the scrolling frames position

I mentioned in my post that I am using a UIListLayout to store all of the buttons. That completely removes the position property from being used.