Problems with scrolling frames

Hello, I have a problem with a scrolling frame in a gun shop, it works perfectly on my screen, but when I use a smaller screen I cannot see all the frames in the scrolling frame.

When I use the big screen:
https://gyazo.com/01048966a3b058a92fd4f01ca75b46eb

When I use the small screen:
https://gyazo.com/c1b0ec8a03ad32b959d181b9ed00d194

ZIndex. Setting the ZIndex on a GUI object will make it appear above other GUI objects.

I dont think thats the problem

Ah my bad. I thought you were talking about something else. Are you adding these individual frames in or are they preset?

Trying messing with ScrollingFrame.CanvasSize

1 Like

If you’re using a UIListLayout object under the ScrollingFrame you can use UIListLayout.AbsoluteContentSize to get the size in pixels of the list:
image

A LocalScript can be used to automatically change the ScrollingFrame.CanvasSize to matched the AbsoluteContentSize:

local scrollingFrame = script.Parent
local listLayout = scrollingFrame.UIListLayout

-- Changes the CanvasSize to AbsoluteContentSize
local function updateFrame()
	frame.CanvasSize = UDim2.new(0, 0, 0, listLayout.AbsoluteContentSize.Y)
end

-- Detect when the AbsoluteContentSize is changed and trigger the function
listLayout :GetPropertyChangedSignal("AbsoluteContentSize"):Connect(updateFrame)
updateFrame()
2 Likes

Im using a UIGridLayout.

30chars