This works
local gametime = game.Lighting.ClockTime
while wait(1)do
if(game.Lighting.ClockTime > 6.3)and(game.Lighting.ClockTime < 17.3)then
window.Color = Color3.new(0.231373, 0.603922, 0.635294)
window.Material = Enum.Material.SmoothPlastic
else
window.Color = Color3.new(0.741176, 0.698039, 0.192157)
window.Material = Enum.Material.Neon
end
end
But this doesn't
local window = game.Workspace.Window
local gametime = game.Lighting.ClockTime
while wait(1)do
if(gametime > 6.3)and(gametime < 17.3)then
window.Color = Color3.new(0.231373, 0.603922, 0.635294)
window.Material = Enum.Material.SmoothPlastic
else
window.Color = Color3.new(0.741176, 0.698039, 0.192157)
window.Material = Enum.Material.Neon
end
end
======================== Can someone explain why it won't work with a variable?
If possible super simply, I just started scripting a few days ago!

5 comments
and also don't use while wait if your cool
Well, there's no disadvantage of using while loop.
i'm talking about while wait() instead of while true.. wait ^^
NVM I suggested him :GetpropertyChangedSignal()
@imKirda and @BestCreativeBoy, I sincerely thank you for you have saved my butt. Keep being awesome!