Hi, to start this off, if you want to add comments to a script, instead of writing it out inside of the script, use the comment feature,
Now, with your problem, try this:
script.Parent.ClickDetector.MouseClick:connect(function()
script.Parent.Transparency=0.6
script.Parent.CanCollide=false
wait(2)
script.Parent.Transparency=0
script.Parent.CanCollide=true
end)
One thing I should note is that the script should be inside of the brick that is going to be doing this. It makes scripts so much easier instead of working with a script outside of the part. Simply cut and paste the script inside of the part in Properties.
Also, leftClick I believe is not a valid event, so you would have to do MouseClick. I would recommend the following wiki article on ClickDetector and how it works, if you wanted to get more in-depth with scripts like this. http://wiki.roblox.com/index.php?title=Clickdetector
Give +1 rep if I helped.
1 comment
do i put the script within the click detector..also i thought you could name your function anything so i named it leftlcick