I got this weird error and I don’t know how to fix.
local no = game.ServerStorage:WaitForChild("Yes")
game.Lighting:GetPropertyChangedSignal("ClockTime"):Connect(function(clockTime)
if (clockTime >= 10) or (clockTime <= 12) then --error line here!
print("Time is between 10:00 and 12:00")
else
print("Oh no! It is not between 10:00 and 12:00, current time: "..clockTime)
end
end)
The :GetPropertyChangedSignal function has no parameter. This should be fixed.
local no = game.ServerStorage:WaitForChild("Yes")
game.Lighting:GetPropertyChangedSignal("ClockTime"):Connect(function()
local clockTime = game.Lighting.ClockTime
if (clockTime >= 10) or (clockTime <= 12) then --error line here!
print("Time is between 10:00 and 12:00")
else
print("Oh no! It is not between 10:00 and 12:00, current time: "..clockTime)
end
end)
Instance:GetPropertyChangedSignal() doesn’t automatically have clockTime as an argument (it doesn’t return any arguments), you need to manually fetch it yourself as mentioned above.