ZonePlus v3.2.0 | Construct dynamic zones and effectively determine players and parts within their boundaries

The module and the autocomplete just kinda doesn’t work anymore for me. There are no errors and no output when using actual code, such as printing players entering zones.

I used this to create a custom renderer for a procedurally generated world. It’s much more efficient on performance than touch connections. Also the renderer has increased my FPS from 15-25 to 47 low to 60 FPS on a laptop. My experience Writing a Custom Renderer Massive Game Optimization Methods - Resources / Community Resources - Developer Forum | Roblox

Yes the way you would do that is

local enum = require(game:GetService("ReplicatedStorage").Zone.Enum)
local zonearray = Zone.new(container)
zonearray.accuracy=enum.enums.Accuracy.Low

That changes the accuracy of all zones

Roblox autocomplete is just bad, not the module’s fault usually. As for the module not working I have no idea what could cause that, I’ve been using it for the last few months and no problems have come up.

2 Likes

this isn’t working for me. Events never trigger when I walk into the zone.

You should try the template place to understand how it works.

No, the module has perfect autocomplete normally when I use it, I don’t think I’m doing anything wrong it looks the same as how I always used it

Is there a way to use the same container in different zones?

i.e;

local ZoneOne = ZonePlus.new(workspace.Zone)
ZoneOne:bindToGroup("One")
ZoneOne.localPlayerEntered:Connect(function()
	print("Entered zone one!")
end)

local ZoneTwo = ZonePlus.new(workspace.Zone)
ZoneTwo:bindToGroup("Two")
ZoneTwo.localPlayerEntered:Connect(function()
	print("Entered zone two!")
end)

When doing this, only ZoneTwo’s localPlayerEntered event gets called. Binding them to different groups also doesn’t seem to solve the issue.

My use case is that I have one zone that has various mechanism acting on it. For example, ambience and game mechanics.

-- In AmbienceController.lua
Zone.localPlayerEntered:Connect(function()
    game.Lighting.Ambient = Color3.new(0.5, 0.5, 0.5)
    game.Lighting.OutdoorAmbient = Color3.new(0.5, 0.5, 0.5)
end)
-- In MinigameController.lua
Zone.localPlayerEntered:Connect(function()
    startMiniGame()
end)

I do not necessarily want to merge both of these into one script. Apologize if otherwise but the documentation does not seem to explain this.

For now, my temporary solution is to initialize only one zone in a controller and create a getter function ZoneController:GetZoneForArea(area) and act on that instead.

Ideally, being able to bind to different groups to create two different functionalities for the same container would be best, so I do not need to have one system just dedicated to managing ‘zones’.

EDIT: FIXED ALREADY, HAD TO DEAL WITH OVERLAP AND RAYCASTPARAMS


Hello! I’m using this system to make a “zone entering and leaving notification” to a game i’m working on. But i’m having some troubles that the query system is affecting the camera (making it zoom in as it had collision) and blocking shots (as seen in the video below 0:06)

I’m separating each zone with large parts

Is there a way to fix those problems i’m having? (I got zero to none knowledge with query, so i really dont know if there is a method that i could use to avoid those)

Watch Desktop 2024.05.15 - 19.14.52.11 | Streamable (somehow this video isnt embedding so… sorry about that)

1 Like

In my map, there are gonna be big areas and I am gonna be detecting when the player enters a certain area, what would be the best way to do this? I can imagine that having big parts to represent the areas might cause lag

Hello, @ForeverHD!

Trying to run :getRandomPoint on an unanchored part returns a exhaustion timeout request, this was a mistake on my end as the zone was not intended to be unanchored, but I thought it would be best to let you know.

Thanks!

1 Like