Hi, I’m looking for a way to refer to custom properties by name stored in a variable.
e.g.
local object = {} local propertyname = "health" object.health = 50 -- the normal way object.\<propertyname\> = 50 -- the way I need
The reason I’m doing it is because I have player object with multiple dynamically selected named properties (I could put them in a numbered table (object.properties[5] = 100) but shortly speaking this would make everything less readable.
Is there a way to do this? Is it good practice or somewhat ‘hacky’ ?