From 404a6b1c6bdf276b8e43b5755bdb1cd2dd95d491 Mon Sep 17 00:00:00 2001 From: Justin van der Leij Date: Sun, 29 Apr 2018 11:28:36 +0200 Subject: [PATCH] Made it so Instance:clear actually WORKS --- lib/instance.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/instance.lua b/lib/instance.lua index 0e999af..27eb4d8 100644 --- a/lib/instance.lua +++ b/lib/instance.lua @@ -214,7 +214,11 @@ end --- Removes all entities from the Instance -- @return self function Instance:clear() - self.entities:clear() + for i = 1, self.entities.size do + self.entities:get(i):destroy() + end + + return self end return setmetatable(Instance, {