Fixed an issue where :setSystem did not acknowledge which system it was setting

This commit is contained in:
Justin van der Leij 2018-04-04 12:38:18 +02:00
parent 358a455c8b
commit 67f32680b5

View file

@ -126,8 +126,8 @@ function Instance:setSystem(system, eventName, callback, enable)
for i = 1, #listeners do
local listener = listeners[i]
if listerner.callback == callback then
listerner.enabled = enable
if listener.system == system and listener.callback == callback then
listener.enabled = enable
break
end
end