I need to find the child of workspace whose name is equal to the string stored in the variable. The problem is when I try to use a variable in findfirstchild, it says the variable is a nil value. This is what I tried:
thisbrick = script.Parent
game.Workspace:FindFirstChild(thisbrick).Transparency = 0.5
In the output it says thisbrick is a nil value.
Yes, I know I could just say script.Parent.Transparency = 0.5, but this is just an example as I need to apply this to a much larger script where doing so wouldn't work, and I decided to just write it on it's own to save your time. If there is an easier way to do this without using findfirstchild please let me know. Thanks!

1 comment
How would you do this for an updating number value?