I tried to make this LocalScript at StarterCharacterScripts but it's not working..
local PointLight = Instance.new("PointLight", script.Parent.Torso) PointLight.Enabled = false PointLight.Range = 50 PointLight.Brightness = 2 PointLight.Shadows = true if game.Lighting.ClockTime >= 22 then PointLight.Enabled = true else if game.Lighting.ClockTime >= 8 then PointLight.Enabled = false end end
Put it in a loop so that the script will constantly check the time.
while true do if game.Lighting.ClockTime >= 22 then PointLight.Enabled = true elseif game.Lighting.ClockTime >= 8 then PointLight.Enabled = false end task.wait() end