Am I doing something wrong here? The print/the rest of the script never goes through even though the clocktime is changing
local t = game.Lighting
t:GetPropertyChangedSignal("ClockTime"):Connect(function()
print("changed")
if t.ClockTime >= 19 or t.ClockTime <= 6 then
-- rest of the script
Did you mean t.ClockTime.Changed:Connect?
Which would be right if ClockTime is like a NumberValue parented to Lighting. If its an attribute, I don’t know if you can do it this way.
Value instances will fire their Changed event when their value changes, so you don’t need GetPropertyChangedSignal in this specific case.