If you have not found a solution, try putting this ServerScript in the “light” beam:
local lgt = script.Parent
local lgting = game.Lighting
lgting.Changed:Connect(function()
if lgting.ClockTime >= 18 or lgting.ClockTime <= 6 then
lgt.Enabled = true
else
lgt.Enabled = false
end
end)