of     1   

TheAlaska
#183474853Saturday, February 13, 2016 2:25 AM GMT

so if for example: script.Parent.Parent.Click1.Value.Value = 1 and I want to use brick A1 in my script Using: script.Parent.A[script.Parent.Parent.Click1.Value.Value].BrickColor = BrickColor.Green() doesn't work, what could I use so that brick A(value) turns green
Icecreamtopblank
#183475170Saturday, February 13, 2016 2:29 AM GMT

script.Parent:findFirstChild("A"+script.Parent.Parent.Click1.Value.Value).BrickColor = BrickColor.Green()
Reset8954098
#183475369Saturday, February 13, 2016 2:32 AM GMT

Properties are prioritized over descendants when indexing. When you use "Click1.Value.Value" I'm assuming you're indexing a Instance named 'Value' correct? It's thinking "Get 'Value' property of 'Click1'" and if it doesn't have a 'Value' property then it will spew out a error. If it does have a property Value, then it's going to throw a error from "Value.Value" because I doubt your using a ObjectValue where in that case you could be doing so. If it is a descendant, then try renaming it to a name that's not a property name. If you're just trying to set the value of 'Click1' and not a descendant of it, then just do "Click1.Value = 1", and to get it's similar to set.
Icecreamtopblank
#183475382Saturday, February 13, 2016 2:33 AM GMT

script.Parent:findFirstChild("A"..script.Parent.Parent.Click1.Value.Value).BrickColor = BrickColor.Green() Sorry I was thinking of Java
cpmoderator12345
#183477290Saturday, February 13, 2016 2:59 AM GMT

java is evil stuff stay away https://www.youtube.com/watch?v=onhFH7jpq2c

    of     1