Alright, so I'm working on my admin script and a major hurdle that came up to me was, how could a player do a command on more than one person at once? For example, if I did the command "ban/a,b,c" how would I be able to get the text where a, b, and c is? I hope this question is not too confusing. I'm not good with string manipulation, so I decided that here would be the best place to ask. :)
✓ ANSWER ACCEPTED
How do I get the text in between commas in a string? (String Manipulation)
1 answer
✓ Accepted answer
You can use the string.split() function. This splits a string into parts based on the defined separator character(s), returning a table of ordered results.
local String = "Hello! I'm, Feahren!"
print(table.unpack(String:split(','))) --> "Hello! I'm" | "Feahren"
This discussion is preserved as it was. New answers, comments, and votes are closed.
