It doesnt want to switch to day back

local countdown = 10
local night = true
while countdown ~= 0 do
	countdown -= 1
	wait(1)
end
if night then
	for i, v in pairs(game.Workspace.Lights:GetChildren()) do

		v.Light.SurfaceLight.Brightness = 0

		v.Light.BrickColor = BrickColor.new(0, 0, 0)

		v.Light.Noise.Volume = 0

		local TurnOff = workspace.TurnOff:Clone()
		TurnOff.Parent = workspace
		TurnOff.Volume = 0.05
		TurnOff:Play()
		end
else
	for i, v in pairs(game.Workspace.Lights:GetChildren()) do -- starting from here it wont switch to day back

		v.Light.SurfaceLight.Brightness = 1

		v.Light.BrickColor = BrickColor.new(Color3.fromRGB(248, 248, 147))

		v.Light.Noise.Volume = 0.1

		local TurnOn = workspace.TurnOn:Clone()
		TurnOn.Parent = workspace
		TurnOn.Volume = 0.05
		TurnOn:Play()
		end
end

Looking at your script, the line if night then and below is only going to fire once because it’s not on a function which would repeat it. What I mean by that is when it turns to day, the script won’t know to run the line below again. (Unless this isn’t the full code of course.)

Also, do you have something that changes the value of night back to false? I can’t seem to see it in your script.

Those conditionals are only being checked once, when the script first executes (directly after the countdown), you need to wrap the code inside a loop such that it is repetitively ran until the loop is broken/terminated.