while true do wait(1) print("s") if game.Lighting.ClockTime > 18 or game.Lighting.ClockTime < 7.5 then script.Parent.SpotLight.Enabled = true print("b") elseif game.Lighting.ClockTime < 18 or game.Lighting.ClockTime > 7.5 then script.Parent.SpotLight.Enabled = false print("c") end end
the output is s c the clock time 19 the spotlight not opened the script is in workspace ( in a part )
hey you! have you ever heard of enes? if you are in trouble, better call enes!
Maybe try putting the script into ServerScriptService and it may work