I'm making a button that will enable or disable a Reactor Laser, when I clicked the button, it doesn't do anything, the output shows no errors so I'm confused.
Code:
local L = game.Workspace.ReactorLasers.ReactorLaser2.Laer
local V = true
script.Parent.ClickDetector.MouseClick:connect(function()
if V == true then
L.Transparency = 1
script.Parent.BrickColor = BrickColor.Green()
V = false
end
if V == false then
L.Transparency = 0
script.Parent.BrickColor = BrickColor.Red()
V = true
end
end)

1 comment
Was "laer" at line one a typo?