Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How can I sort the values of objects in the explorer?

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)

https://i.gyazo.com/563d8569a09055b305d6575497f949dd.png

2 comments

1

What do you want to sort by?

0

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.

1 answer

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.