I've seen it used in 1 or 2 scripts, but I do not know what it is used for, nor do I know how to use it, I do know it is used to find a string, but I am not too sure.
You are correct, it is used to find a string of characters within a string and it returns the indexes.
str = "hi u ok man" print(str:find("ok")) --> 6,7
You can use it to find the location of a string, inside a string. Here's an example:
local mystring = "Hello, world" print(mystring:sub(mystring:find("Hello"))) -- Hello
mystring:find("Hello") returns 1 5 (not 15!) because Hello in the string mystring is between the 1st and 5th character positions.
It's the shorthand for string.find, like the shorthand for string.lower() is :lower().