is there any way I can refer to an entire table? for example: I want to know if in any of the elements of this table, there is the variable "Hello World" without having to refer exactly to its exact position: "if Table [2] ==" Hellow World "then ... is there any way?
You can go through the entire table using a for loop. Judging by your question, you're looking to see if any values are "Hello World".
1 | for i,v in pairs (table) do |
2 | if table [ i ] .Value = = "Hello World" then |
3 | --put whatever you want here |
4 | break -- exits the loop, only happens if the condition above is true. |
5 | end |
6 | end |
I haven't tried it but it should work. Let me know if any errors happen.