Every time there is a frame added the cell padding will increase I want it to be like this:
But the result is this:
Local Script
script.Parent.Player1Inventory.Main.ChildAdded:Connect(function()
script.Parent.Player1Inventory.Main.CanvasSize = UDim2.new(0, 0, 0, script.Parent.Player1Inventory.Main.UIGridLayout.AbsoluteContentSize.Y + 200)
end)
script.Parent.Player2Inventory.Main.ChildAdded:Connect(function()
script.Parent.Player2Inventory.Main.CanvasSize = UDim2.new(0, 0, 0, script.Parent.Player2Inventory.Main.UIGridLayout.AbsoluteContentSize.Y + 200)
end)
script.Parent.Player1Inventory.Main.ChildRemoved:Connect(function()
script.Parent.Player1Inventory.Main.CanvasSize = UDim2.new(0, 0, 0, script.Parent.Player1Inventory.Main.UIGridLayout.AbsoluteContentSize.Y + 200)
end)
script.Parent.Player2Inventory.Main.ChildRemoved:Connect(function()
script.Parent.Player2Inventory.Main.CanvasSize = UDim2.new(0, 0, 0, script.Parent.Player2Inventory.Main.UIGridLayout.AbsoluteContentSize.Y + 200)
end)