Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Is there any way to determine the age of the values stored in a table?

Asked by
Unhumanly 152
5 years ago

The reason I'm asking this is because someone posted a question about UserInputService, and someone mentioned :GetKeysPressed() as a way to detect a key combination(or at least I thought they were), but when tested, it turns out the table that function returns is sorted alphabetically, and not chronologically.

So if the values in a table aren't sorted such that the newest value is the last key of the table, how would I determine the age of each value?

Answer this question