#table.sort not sorting?
1 messages · Page 1 of 1 (latest)
table.sort(oSelectionFrame2.Frame.MainText:GetChildren(), function(a, b)
return tonumber(a.Name) < tonumber(b.Name)
end)
for _, v in oSelectionFrame2.Frame.MainText:GetChildren() do
print(v.Name)
end
Of course its not
Instance:GetChildren generates an array of the instance's children each time it's called
The array has no affect on the order of the children
local children = --[[Path.To.Parent]]:GetChildren()
table.sort(children, function(childA, childB)
return childA.Name < childB.Name
end)
for _, child in children do
print(child)
end
thats so stupid
How did you get scripter 4?
I don't have S4. I'm S3
In the grand scheme of things, it's not
You'll come to understand why it works this way soon
It's not about why it doesn't work the way you wanted, but why it shouldn't
How did you get s3? How did you learn how to script past intermediate? I don't know how to advance my skills.
It kinda just happens
I started working on real projects
nah i get it, i just cant believe i spent 30 minutes trying to firgure out why its not sorting