It appears to work up until the first 'end'.
local LightPart = script.Parent
local SurfaceLight = LightPart.SurfaceLight
while true do
wait(0.1)
if game.Lighting:GetMinutesAfterMidnight() > 6 * 60 then
LightPart.Material = Enum.Material.Glass
SurfaceLight.Enabled = false
end
if game.Lighting:GetMinutesAfterMidnight() > 18 * 60 then
LightPart.Material = Enum.Material.Neon
SurfaceLight.Enabled = true
end
end

2 comments
What do you mean by 'first end'?
We need your day/night script.