Having issues with string.find

I think this might be me just being stupid but OK.

So I’m doing a simple string:find() and it outputs 2 numbers.
“1 7”

I’d just like to get those 2 numbers separate, but I don’t know how, I’ve been searching all over the internet but didn’t find any solution.
Any help?

When you call string.find(), it returns those two variables separately. You can do something like local indexStart, indexEnd = ("someStringHere"):find("whatever"), with the variables being whatever you want. The only way they’d be combined is if you’re directly printing the results without assigning them to a variable.

3 Likes