local Folder = #script.Parent.Items:GetChildren()
How do I select the most recent item from a folder?
local Folder = #script.Parent.Items:GetChildren()
How do I select the most recent item from a folder?
I am happy to help, but what do you mean by "select the most recent number, what do you want the script to execute?
Inside the folder I have things in numbers 1, 2, 3, 4, 5… and I need to take a lot of things inside and select the last thing under the last number
You cant store numbers (you mean numberValues) in folders, that would be a table.
local FolderClone = table.clone(Folder)
table.sort(FolderClone,function(a,b)
return tonumber(a) > return tonumber(b)
end)
print(FolderClone)
i think this is what ur looking for
Is it possible to come up with something similar?
local HowManyInFolder = #dialogueFolder|
print(dialogueFolder:FindFirstChild(HowManyInFolder))|
for _,v in ipairs() or for _,v in pairs()