Use of table.find()

Can anyone help me with table.find(tablelist, arg) I tried finding documentation for it on the roblox wiki and also on the lua site. I can not seem to find any documentation but still it is available when you do auto correct. Can anyone help? thanks.

8 Likes

table.find(t, element) finds the index position of element. It returns nil if there is no element in the table.

Its uses are

  • Quick verification that an element is in the table
  • Get the index of the element, probably so you can pop it from the list or any other index-based operations rather than element based
65 Likes

https://developer.roblox.com/en-us/api-reference/lua-docs/table
Here are the lua docs for table. table.find() is at the bottom.

14 Likes