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

How to organize variables from greatest to least?[SOLVED]

I'm trying to compare a group of variables to see which one is larger and whether or not one of them equal each other. I realise you can use an if elseif chain but is there a better way to do this?

5 comments

0

Can you give an example data set, and what you want the results to be?

0

int1=3 int2=2 int3=64 int4=10. Basically, I want to arrange these in order from least to greatest or greatest to least.

0

Without using an if elseif chain

1

Couldn't you just create a table and sort it?

0

Didnt think of that, thanks.

1 answer

✓ Accepted answer

Simple. Use table.sort(table). Very easy :D!

This discussion is preserved as it was. New answers, comments, and votes are closed.