i just realized I used script:GetAttributeChangedSignal("Recording"):Connect(function() so it was firing twice lmao (yeah but i think from the way I generate the instances it auto sorts I think)
Order isn’t guaranteed this way. If you want a surefire way to get them in a certain order you could use table.sort, passing a function to compare the children like so, assuming all of the script’s children names follow a specific format:
local children = script:GetChildren()
table.sort(children, function(a, b)
return tonumber(a.Name:gsub('name_', '')) < tonumber(b.Name:gsub('name_', ''))
end)
for _, child in children do...
-- or
for _, child in ipairs(children) do...