How to change transparency of a Part when you click on a click detector?
I need to give some context, the script is inside a button part, and the click detector is in a part called "ButtonActivate". The Button Part is called ButtonThing and Button Thing is inside a model with ButtonActivate, and the model is in a folder called Button. I want to make it so that when you click on the button activate, the ButtonThing's transparency is equal to 1, but my script doesn't work. (I'm new to scripting btw)
The script that doesn't work:
2 | script.Parent.Transparency = 1 |
5 | script.Parent.Parent.ButtonActivate.ClickDetector:connect(OnClick) |