You click the part, and you hold it down to make the Transparency 1. If you let go, the brick will have Transparency 0.
Basically, I have a simple click detector script that you click once, transparency 1, click again, transparency 0. Is there any way to make it so if you click & hold, transparency 1, let go, transparency 0.
function onClicked(playerWhoClicked)
if game.Workspace.Lights.rvl.L.Enabled == false then
game.Workspace.rvc.Transparency = 1
game.Workspace.Lights.rvl.L.Enabled = true
else
game.Workspace.rvc.Transparency = 0
game.Workspace.Lights.rvl.L.Enabled = false
end
end
script.Parent.ClickDetector.MouseClick:connect(onClicked)
The script works, but I don't know how to make it click & hold. |