Just like you can pick random number with math.random are there any way to pick between random strings for example printing out random strings between : "Hi welcome" or "Hi how are you"
✓ ANSWER ACCEPTED
How to choose between random strings?
1 answer
✓ Accepted answer
You could do that with this simple example:
local stringTable = {
"sneaky beaky",
"Hello world!",
"helo my friendo",
"yeah",
"yes",
"no"
}
local randomString = math.random(1,#stringTable)
for i,v in pairs(stringTable) do
if i == randomString then
print(v)
end
end
You can add as many strings as you want!
This discussion is preserved as it was. New answers, comments, and votes are closed.

2 comments
Thank you again my friend!
Thank you again my friend!