Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How would I make a table print a variable with the data in it?

Asked by 5 years ago
Tetsy = {

Test1 = "Hi",

Test2 = "Hello"

}

for i, v in pairs(Tetsy) do    
if v == "Hello" then    
print(v)
end
end

When v == "Hello" I want it to print the variable. In this case, it is "Test1". But it instead only prints "Hello". How would I make it so it prints "Test1"?

Answer this question