Can exploiters get into different things with local script being in my game? I am really unsure. If so, I'd like some help converting these to Remote.
water on
local isOn = false
function on()
isOn = true
script.Parent.Value.Value = 0
end
function off()
isOn = false
script.Parent.Value.Value = 1
end
function onClicked()
if isOn == true then off() else on() end
end
script.Parent.ClickDetector.MouseClick:connect(onClicked)
on()
light on
local isOn = false
function on()
isOn = true
script.Parent.Parent.Value.Value = 0
script.Parent.Parent.click1.Transparency = 0
script.Parent.Parent.click2.Transparency = 1
script.Parent.Sound:Play()
wait(0.3)
script.Parent.Sound:Stop()
end
function off()
isOn = false
script.Parent.Parent.Value.Value = 1
script.Parent.Parent.click1.Transparency = 1
script.Parent.Parent.click2.Transparency = 0
script.Parent.Sound:Play()
wait(0.3)
script.Parent.Sound:Stop()
end
function onClicked()
if isOn == true then off() else on() end
end
script.Parent.Parent.click.ClickDetector.MouseClick:connect(onClicked)
on()

1 comment
With FE, the effects will only show to the player who interacted. However, if you want everyone to also see the effects then you'll want to use remote events.