From 717a98ff763980248ca885044fe0024cdb10d3e9 Mon Sep 17 00:00:00 2001 From: Colin Miller <70069885+SnarlyZoo@users.noreply.github.com> Date: Sun, 28 Apr 2024 01:19:52 -0500 Subject: [PATCH] Fixed __newindex issue --- modules/component/init.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/component/init.lua b/modules/component/init.lua index 66fd5ece..bc27c377 100644 --- a/modules/component/init.lua +++ b/modules/component/init.lua @@ -318,16 +318,16 @@ function Component.new(config: ComponentConfig) end function Component:_instantiate(instance: Instance) - self.__newindex = function(_, key, value) - if self._propertyChangedSignal then + self.__newindex = function(tbl, key, value) + if tbl._propertyChangedSignal then if type(key) == "string" then local firstChar = string.sub(key, 1, 1) if firstChar ~= "_" and firstChar == string.upper(firstChar) then - self._propertyChangedSignal:Fire(key, value) + tbl._propertyChangedSignal:Fire(key, value) end end end - rawset(self, key, value) + rawset(tbl, key, value) end local component = setmetatable({}, self) component.Instance = instance