1 |
How can I use a clickdetector to register when someone left clicks, when it registers the click I want it to turn the part the clickdetector and script is in to transparency = 1.
I've got some of my script this time, I think its what it should be but its not working:
1 | MouseClick:connect( function ( |
2 | wait( 1 ) |
3 | script.Parent.Transparency = 0.9 |
4 | end ? |
Code:
1 | script.Parent.MouseClick:Connect( function () -- Make sure this script is a child of the clickdetector |
2 | wait( 1 ) |
3 | script.Parent.Parent.Transparency = 0.9 |
4 | end ) |
MouseClick isn't recognized as an event in that script because you aren't telling the script what it's from. You must first add the path to the ClickDetector.
Also, I fixed the function.