Module script question

Hello, Im currently trying to acess module script information from a value. Like for example, the value of a string value is “bug”, and i want to acess “bug” in the module script from this value. Any idea How i could do this? Here is my script, where im try to make it so depending on the attack, the color of the gui changes.

If this question sounds confusing,tell me so.
Any help is appreciated, Thanks!


image
image

im not sure what youre trying to achieve, but from the error you gave its saying that whatever youre trying to change the color of is nil (it doesnt exist).

My thought is that you didnt capitalize the C in color so the script errors, but im unsure really

Instead of

moduleatk.atk11 

I think you just need

moduleatk[atk11] 

To clarify, this - moduleatk.atk11 means moduleatk[“atk11”] and I guess you don’t have a table under that key. Hence why it comes out as nil

1 Like