trying to make it that at night, the windows in the game become lit up and smoke comes out of the chimneys. the problem is that when the day is over and it switches to night, the prints completely stop. i've been working on this for a day now.
script:
task.spawn(function()
while task.wait(0.5) do
Lighting.ClockTime += 0.01
if Lighting.ClockTime > 17.9 and Lighting.ClockTime < 6.3 then
print("night")
for index, part:BasePart in pairs(workspace:GetDescendants()) do
print("for thingy worked (night)")
if part.Name == "ChimneyParticlePart" then
print("yes its a chiney (night)")
part.ParticleEmitter.Enabled = true
print("chimney enabled")
end
if part.Name == "HouseWindow" then
print("yes its a housewindow (night)")
part.Color = Color3.new(1,1,1)
print("housewindow turned bright")
end
end
end
if Lighting.ClockTime < 17.9 and Lighting.ClockTime > 6.3 then
print("day")
for index, part:BasePart in pairs(workspace:GetChildren()) do
print("for thingy worked (day)")
if part.Name == "ChimneyParticlePart" then
print("yes its a chimney")
part.ParticleEmitter.Enabled = false
print("chimney disabled")
end
if part.Name == "HouseWindow" then
print("yes its a housewindow")
part.Color = Color3.new(0,0,0)
print("housewindows turned dark")
end
end
end
end
end)