How do I make something like local menuB={ B1="string" } ?

I am trying to figure out a way to create something like this:


local menuButton={
	B1 = ["String"],
}

Any tips?

You’re not being very specific. Provide context and describe what you’re trying to do.

I want to create a global variable like I showed in first post.

I want to use it on this:


b1:SetText(propButton[B1])

So I can alter the button names without going through the code too much.

[lua]
local menuButton = {
B1 = “string value”
}

– or
local menuButton = {
[“B1”] = “string value”
}

– then

b1:setText(propButton[“B1”])
[/lua]

Thank you very much :slight_smile: