It's a script that simply makes a decal visible/invisible on a brick with a ClickDetector. However, it activates using both left click and right click. How do I make it activate using only the left mouse click?
local isOn = true function on() isOn = true script.Parent.Decal.Transparency = 0 end function off() isOn = false script.Parent.Decal.Transparency = 1 end function onClicked() if isOn == true then off() else on() end end script.Parent.ClickDetector.MouseClick:connect(onClicked) on()
I've tried using [script.Parent.ClickDetector.MouseButton1Click:connect(onClicked)] for line 19 but then the script doesn't work at all.