the error is in the title. the error occurs on the line 'print('the hmi is: '..hmi.Value..'the children: '..children[hmi.Value - 1].name)' (line 8)
if you need an explanation or something ill edit it
hmi.Changed:connect(function() print('The hmi is now ' .. hmi.Value) local lasthmi = hmi.Value - 1 if hmi.Value > 1 then local children = scrollingframe:GetChildren() local newitem = scrollingframe.Item1:Clone() newitem.Name = 'Item'..hmi.Value print('the hmi is: '..hmi.Value..'the children: '..children[hmi.Value - 1].name) end end)
--EDIT: info about the hmi value: 'HMI is a numbervalue which sees how many children the players backpack has, i need this value -1 because every time it goes up a new frame in a gui is created and i need the last frames position to update it for the next (make it plus (0,0,0.002,0)) ------- hopefully that makes some sense'