From 606bb3533d77b7cc1f3b65f7c57c0677fec0c284 Mon Sep 17 00:00:00 2001 From: 1ForeverHD Date: Wed, 7 Apr 2021 11:49:01 +0100 Subject: [PATCH] Added updateDetection within constructor to prevent nil comparisons --- src/Zone/init.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Zone/init.lua b/src/Zone/init.lua index fa5f429..bcdfc15 100644 --- a/src/Zone/init.lua +++ b/src/Zone/init.lua @@ -283,6 +283,9 @@ function Zone.new(group) self._currentExitDetection = nil -- This will also update automatically internally self.totalPartVolume = 0 + -- This updates _currentEnterDetection and _currentExitDetection right away to prevent nil comparisons + ZoneController.updateDetection(self) + -- Signals self.updated = maid:give(Signal.new()) local triggerTypes = {