From fdb7fe484965da0350f45880883e2bc2aad25cd7 Mon Sep 17 00:00:00 2001 From: Justin van der Leij Date: Sun, 29 Apr 2018 11:24:38 +0200 Subject: [PATCH] Added Instance:clear --- lib/instance.lua | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/instance.lua b/lib/instance.lua index 869afee..0e999af 100644 --- a/lib/instance.lua +++ b/lib/instance.lua @@ -211,6 +211,12 @@ function Instance:emit(eventName, ...) return self end +--- Removes all entities from the Instance +-- @return self +function Instance:clear() + self.entities:clear() +end + return setmetatable(Instance, { __call = function(_, ...) return Instance.new(...) end, })