I want to sort the values of 12 items in the explorer within this script, and I'm not sure how to do it.
function Click()
script.Parent.PlayerValues:GetChildren()
**???**
end
script.Parent.Parent.MouseButton1Click:connect(Click)
I want to sort the values of 12 items in the explorer within this script, and I'm not sure how to do it.
function Click()
script.Parent.PlayerValues:GetChildren()
**???**
end
script.Parent.Parent.MouseButton1Click:connect(Click)
local values = {}
for n = 12, 1, -1 do
values[#values + 1] = script.Parent.PlayerValues["Player" .. n]
end
This discussion is preserved as it was. New answers, comments, and votes are closed.
2 comments
What do you want to sort by?
I want the script to sort the 12 values from highest to lowest in a way that I can use that information to use the items in a certain way.