From f7cab543a32107d74cadfe0f57f4181cbfb5d752 Mon Sep 17 00:00:00 2001 From: 1ForeverHD Date: Thu, 17 Jun 2021 17:38:46 +0100 Subject: [PATCH] Fixed seat disabling within part zones --- docs/changelog.md | 7 +++++++ src/Zone/VERSION.lua | 2 +- src/Zone/init.lua | 6 +++++- 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/docs/changelog.md b/docs/changelog.md index 50d0e2a..7966412 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -1,3 +1,10 @@ +## [2.2.3] - June 17 2021 +### Fixed +- The incorrect disabling of Seats and VehicleSeats within Part Zones. + + + +-------- ## [2.2.2] - June 4 2021 ### Improved - The accounting of character parts when removed/added via systems like HumanoidDescriptions. diff --git a/src/Zone/VERSION.lua b/src/Zone/VERSION.lua index ec3caa2..5f2b59c 100644 --- a/src/Zone/VERSION.lua +++ b/src/Zone/VERSION.lua @@ -1 +1 @@ --- v2.2.2 \ No newline at end of file +-- v2.2.3 \ No newline at end of file diff --git a/src/Zone/init.lua b/src/Zone/init.lua index 4cc60f5..43ca84e 100644 --- a/src/Zone/init.lua +++ b/src/Zone/init.lua @@ -610,7 +610,11 @@ function Zone:_partTouchedZone(part) local regionConstructor = self:_getRegionConstructor(part) local partMaid = self._maid:give(Maid.new()) trackingDict[part] = partMaid - part.CanTouch = false + local instanceClassesToIgnore = {Seat = true, VehicleSeat = true} + local instanceNamesToIgnore = {HumanoidRootPart = true} + if not (instanceClassesToIgnore[part.ClassName] or not instanceNamesToIgnore[part.Name]) then + part.CanTouch = false + end -- local partVolume = round((part.Size.X * part.Size.Y * part.Size.Z), 5) self.totalPartVolume += partVolume