I need Some Help with UiListLayout

I know people have probably gone over this but i personally could not find what i was looking for…

Here is what is happening with the Scrolling Frame

i need help with trying to set canvis size and also updating the UI Size so its perfect.

here is the code that makes this kinda work

local function AddPlayersIntoList()
	
	for i = 1, #GetPlayerFriendsModule do
		
		local CreateTextLabel = Instance.new("TextLabel")
		
		AddUIThings(CreateTextLabel)
		CreateTextLabel.Name = "PlayerInfoHolder"
		CreateTextLabel.Text = i .. " " .. GetPlayerFriendsModule[i]
		CreateTextLabel.Size = UDim2.fromScale(.9,.05)
		CreateTextLabel.BackgroundTransparency = 0
		CreateTextLabel.BackgroundColor3 = Color3.fromRGB(42, 42, 42)
		CreateTextLabel.BorderSizePixel = 0
		CreateTextLabel.TextColor3 = Color3.fromRGB(255, 255, 255)
		CreateTextLabel.Font = Enum.Font.Cartoon
		CreateTextLabel.TextScaled = true
		CreateTextLabel.Parent = FriendList
		
	end
end

**GetPlayerFriendsModule ** is a module that returns a table of the amount of friends I have

You increase the canvas size in the scrolling frame
Code Example:

ScrollingFrame.CanvasSize = UDIM2.new(0,0,20,0)

Use the AutomaticCanvasSize property and set it to Y. This is more efficient then the method above. Read more (make sure to set the canvas size to 0 first)

3 Likes

Bro theres no way i didn’t know about that lol…
thanks though now i know an more efficient method.

1 Like