I want to make a Sword shop but I am stuck at Scrolling Frame.
I’m trying to make an auto canvas size like:
if there is a 5 Items in the shop, the canvas size must be fit with 5 Items
But If I add 3 more Items later, the canvas size must be fit with 8 Items
I looked some solutions but I found nothing
This is my ScrollingFrame Properties
This is my UiListLayout Properties
And This is my Template’s properties
ItemList.CanvasSize = UDim2.new(0, 0, (ItemList.UIListLayout.AbsoluteContentSize.Y / 100) + (#ItemList:GetChildren() * -0.2352), 0)
This is my auto canvas size code but It doesn’t work for every device cuz the scale thing on UI’s
So please can someone explain me, how I’m do this with correct way
SOTR654
(SOTR654)
March 18, 2022, 8:11pm
2
Set AutomaticCanvasSize to Y, this will make it expand down
1 Like
I tried that, It doesn’t scroll very well
SOTR654
(SOTR654)
March 18, 2022, 8:40pm
4
How?, what happen?, send an image of how it looks and how you want it to look
This when I opened the AutoCanvasSize and Used 1 line of code
If I add more Template inside of the ScrollingFrame, they’re going to outside of the ScrollingFrame but if I delete some Template now There will be a spaces!
ItemList.CanvasSize = UDim2.new(0, 0, (#ItemList:GetChildren() * 0.278), 0)
This is my code
I want to do; the canvas size must be perfectly fit it
SOTR654
(SOTR654)
March 18, 2022, 9:26pm
6
Do you want the spaces removed? sets Padding of UIListLayout to 0, 0.
No not that, Like shop frame. They auto canvas sized depends on tool number