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'

7 comments
That error means that you are trying to index a nil value. I am not really good at scripting but I think that the [hmi.Value - 1] has no value in it.
means hmi is nil, or if hmi is an objectvalue means its value is nil. More info on hmi please?
im sorry it was my own foult i found it out myself i made a dumb mistake
it still doesn't work nevermind
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
.name's "N" is lowercase, change it to .Name, remember that lua is case sensative
that is the only discrepancy i could find, since any numbervalue's value is never nil