I have a script. When you click it (yes i do have a click detector), it is supposed to turn invisible. Pretty simple script, but it isn't working
here is the script
function click() wait(0.5) script.Parent.Transparency = 1 end script.Parent.MouseButton1Down:connect(click)
Thank you
Your problem is the fact that you're using the wrong event.
MouseButton1Down
is used for GUIs. However, you want to make a Part clickable, so you need a different event.
What you're looking for is the MouseClick
event of ClickDetectors.
Remember, a Part itself has no events to record mouse input. Parts are entirely dependent on their ClickDetectors.
function click() script.Parent.Transparency = 1 end script.Parent.ClickDetector.MouseClick:connect(click)
If you're putting the script in the part, you're trying to bind the click event to the part.
script.Parent.ClickDetector.MouseButton1Down:connect(click)
If you're putting the script in the detector, you're trying to make the detector transparent.
script.Parent.Parent.Transparency = 1