12:44:39.658 - ReplicatedStorage.listController:36: attempt to index nil with 'Y' 12:44:39.659 - Stack Begin 12:44:39.660 - Script 'ReplicatedStorage.listController', Line 36 - function dynamicTruncateCanvas 12:44:39.660 - Script 'ReplicatedStorage.notifController', Line 70 - function addNotifacation 12:44:39.660 - Script 'Players.benbebop.PlayerScripts.ErrorMessager', Line 17 12:44:39.660 - Stack End
listController
function list.dynamicTruncateCanvas(dir)
local x = dir:GetChildren()
local scale = 0
local offset = 0
for i = 1,#x do
if x ~= nil and x.ClassName ~= "UIListLayout" then
scale = scale + x.Size.Y.Scale
offset = scale + x.Size.Y.Offset
end
end
dir.CanvasSize = UDim2.new(0, 0, scale, offset)
end
Line 36 = Line 7
I don't see why it won't work, its gets as far as x.Size (Confirming this is getting the right objects) but for some reason fails on getting the Y attribute. Anyone know what is going on?

1 comment
While this wouldn't have fixed it exactly, it did make me realise that I somehow forgot [i]. Thanks.