-
What do you want to achieve? Keep it simple and clear!
im trying to make a scrolling frame that only can scroll when the items go “off” the frame -
What is the issue? Include screenshots / videos if possible!
im trying to do it for so long and i just don’t know how to make it so that it fits perfectly -
What solutions have you tried so far? Did you look for solutions on the Developer Hub?
i looked in dev forum but didn’t find anything that worked
also tried using UIGridLayout and UIListLayout which didn’t work
code that manages the frame:
local temp = script.template:Clone()
temp.Parent = script.Parent.inventory.items
temp.Position = temp.Position+UDim2.new(posX,0,posY,0)
temp.Visible = false
table.insert(toEnable,temp)
posX = temp.Position.X.Scale+temp.Size.X.Scale
if temp.Position.X.Scale > 0.9 then
--print('a')
posY = temp.Position.Y.Scale+temp.Size.Y.Scale
posX = 0
temp.Position = script.template.Position+UDim2.new(posX,0,posY,0)
end
script.Parent.inventory.items.CanvasSize = UDim2.new(0,0,0,temp.AbsolutePosition.Y)
for _,v in pairs(temp.item_viewport:GetDescendants()) do
num = num + 1
end
for _,v in pairs(temp.item_viewport:GetDescendants()) do
spawn(function()
local succ, fail = pcall(function()
game:GetService("ContentProvider"):PreloadAsync({v})
l = l + 1
end)
if fail then warn(fail) end
end)
end
any help would be appreciated