How would i detect numbers that comr after commas?

Im making a tool order, rather then seperate settings it will be one setting with a textbox. Entered is 1, 2, 3

1 being the first digit indicating shoot
2 is the same but pass
3 is the same but gk.

I wanna detect the entered numbers so if the entered number was 2, 3, 1 then
Shoot would be order 2
Pass is order 3
Gk is the order 1



You can probably use string.split(str, ",") which would return a table.


So… that would split the numbers but how do i get each one into seperate variables

1 Like
local numbers = string.split(str, ", ")
local shoot,pass,gk = numbers[1],numbers[2],numbers[3]
1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.