How to return the greatest of a group of numbers?

I can’t seem to find an easy way to do this from the wiki, if anyone knows how to do this then please let me know.

Thanks in advance

[lua]math.max( vararg numbers )[/lua]

Basically, [lua]math.max( 1, 2, 3, 40, 100, 1000 );[/lua]

will return 1000!

Hope this helps! If it resolved your question please feel free to mark this topic as solved in the upper left corner next to the reply button; otherwise please feel free to continue asking questions :slight_smile:

Oh I saw math.max on the wiki but didn’t think that was it lol, thanks I’m pretty sure this will work.