v4.0.0: modernized API
Added
Zone.fromBox(cframe, size)- Creates optimized box-shaped zones using GetPartBoundsInBoxZone.fromSphere(position, radius)- Creates optimized spherical zones using GetPartBoundsInRadiusZone:setZoneShape(enumIdOrName)- Allows manual control over spatial query methodZoneShapeenum with options: Auto, Box, Sphere- Modern OverlapParams management with automatic reuse for better performance
- Comprehensive documentation on spatial query API usage
Changed
- BREAKING: Replaced deprecated
Region3with modernCFrame + Sizeapproachzone.regionis now split intozone.regionCFrameandzone.regionSizezone.exactRegionis nowzone.exactRegionCFrameandzone.exactRegionSize
- Updated all
FilterType.Whitelist/Blacklistto modernFilterType.Include/Exclude - Optimized OverlapParams reuse throughout the codebase
- Enhanced spatial query method selection based on zone geometry
- Improved README with modern API comparison and performance tips
PS: I have an automated formatter, so it unnecessarily realigned many of the source files.
Many thanks for the Pull Request @Froredion, it looks like a collection of fantastic improvements, and I'm excited to fully dive in and review once a few other projects are wrapped up in 2026
so i tested it in live game but..
its using .fromBox with medium accuracy.
im also added table.clear(self) and setmetatable(self, nil) when calling .destroy on zone.
When you destroy a zone with table.clear(self) and setmetatable(self, nil), the zone object's properties (like zone.regionCFrame, zone.regionSize) become nil. However, the ZoneController's heartbeat connections might still be running and trying to access these properties before the zone is fully deregistered.
Is this what you mean? If so, I can see why it's happening.
yeah seems its fixed and i dont think you have to do this:
local occupantsDict = zonesAndOccupants[zone] or {}
local occupantsPresent = false
for k, v in pairs(occupantsDict) do
occupantsPresent = true
break
end
it should be:
local occupantsDict = zonesAndOccupants[zone] or {}
local occupantsPresent = next(occupantsDict) ~= nil
also, i dont think if you still have to use pairs(tbl) in 2025.
Got it, will do the edit soon.
This seems fully Ai written, assuming it’s entirely ai since its from superbullet
I am the creator of Superbullet.
yeah seems its fixed and i dont think you have to do this:
local occupantsDict = zonesAndOccupants[zone] or {} local occupantsPresent = false for k, v in pairs(occupantsDict) do occupantsPresent = true break endit should be:
local occupantsDict = zonesAndOccupants[zone] or {} local occupantsPresent = next(occupantsDict) ~= nilalso, i dont think if you still have to use
pairs(tbl)in 2025.
I've added the following:
- added a tester for zone destroying
- improved code maintainability (your comments)
- added selene.toml for people who wants to contribute and has selene installed
I can say that all are now properly tested.