menu
Roblox Forum Archive
Home
User Search
Forums
Donate
search
settings
Home
User Search
Forums
Donate
launch
Go to User Dashboard
Forums
Scripters
best way to sort 5 intvalues?
chevron_left
chevron_left
chevron_left
of
1
chevron_right
chevron_right
chevron_right
best way to sort 5 intvalues?
Festivereinhard2
Join Date: 2015-12-08
Post Count: 587
#215507753
Friday, April 28, 2017 10:45 PM GMT
what is the best way to sort and then return 5 intvalues from highest value to lowest?
Go to point in time
arrow_right
10 minutes before
5 minutes before
At time of posting
5 minutes after
10 minutes after
more_horiz
Wunder_Wulfe
Join Date: 2016-09-13
Post Count: 8356
#215507884
Friday, April 28, 2017 10:47 PM GMT
local values = { list of values } table.sort( values, function( a, b ) return a.Value >= b.Value end )
Go to point in time
arrow_right
10 minutes before
5 minutes before
At time of posting
5 minutes after
10 minutes after
more_horiz
Wunder_Wulfe
Join Date: 2016-09-13
Post Count: 8356
#215507969
Friday, April 28, 2017 10:48 PM GMT
also i recommend storing the function so u dont clog up the memory (even with garbage collection)
Go to point in time
arrow_right
10 minutes before
5 minutes before
At time of posting
5 minutes after
10 minutes after
more_horiz
chevron_left
chevron_left
chevron_left
of
1
chevron_right
chevron_right
chevron_right