I got this error with a script that toggles lights automatically at day/night at a building. (currently tidying it, but can’t even get it working)
I literally have no clue what this means, nor can I find anything about it.
Script with error in it:
local parlour = script.Parent.Parent.Parent.Parent
local nightValue = game.Workspace.DayNightCycleValues.IsNight
function runForLoop()
parlour = nil
parlour = script.Parent.Parent.Parent.Parent
for i, v in pairs(parlour:GetDescendants()) do
if v:IsA("SurfaceLight") and v.Name == "NightOnly" then
if nightValue.Value == true then
v.Enabled = true
end
if nightValue.Value == false then
v.Enabled = false
end
end
end
end
nightValue:GetPropertyChangedSignal("Value"):connect(runForLoop)
parlour.ChildAdded:connect(runForLoop)
Help clarifying what this error is would be very useful.
Cheers, reddust1
