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

I have V2 but I didn’t remember to remove additionalHeight, thank you so much for getting a quick response. Honestly, I enjoy zone+ V2, good job making it.

5 Likes

Hello, just want to let you know that the link for the API takes you to “https://1foreverhd.github.io/ZonePlus/zone/”, which is an Error 404, instead of “Zone - ZonePlus”.

5 Likes

Quick question;

Whenever I click play, both in Studio and in real servers, the descendant BaseParts of my ZoneGroup get destroyed. Do you know of a solution to this issue?
There are no other scripts in the game at all, and it’s currently just meshes and baseparts in the game.

My script is as follows:

local Zone = require(game:GetService("ReplicatedStorage").Zone)
local zoneGroup = workspace.LobbyZoneGroup
local zone = Zone.new(zoneGroup)

zone.localPlayerEntered:Connect(function()
	PlayThing()
end)

The ZoneGroup is as follows:
75fc3e91dc343a30957775c8687cb040

4 Likes

ZonePlus shouldn’t be destroying any descendant baseparts. Can you provide a video showing the workspace before and after, or DM me a stripped-down place file with the zone where parts are being destroyed.

4 Likes

This dude is doing the impossible! Keep up the good work :smiley:

4 Likes

Probably may need some explanations that it’s suggested to keep parts in workspace.
I didn’t see anything in the documentation about how Zone parts should be placed and saved.
stating that ZonePlus v2 relies on the part .Touched events before checking if a player is in a Region3 etc.

I was thinking that I could get away with moving Zone parts into ServerStorage since I don’t plan to use the parts with any visual effects.

Is it just suggested to anchor parts, transparency 1, cancollide false and part inside workspace to work for my case?

Probably may also want to support r15, seems this only supports r6 because all the Zone’s are waiting for “Torso”. I’ve modified mine to support both. I didn’t need to know if an arm entered, was just wanting to know if a player was in a zone so I added HumanoidRootPart as the one part to watch for.


Edit:
I’ve went ahead and tried again to use the module unmodified, still using playerAdded. Seems I was just accidently editing the Client side instead of the Server side to do team checks and everything actually worked properly.

Just need some notes about keeping parts inside Workspace so Zone can have ‘clients’ check if a player is in a zone.

4 Likes

Make sure Archivable on the instances are enabled

3 Likes

Is there a way of retrieving the name of the zone entered? I’d like to use it for music zones in my game. Great module btw!

3 Likes

Nice job, this is easier to use than ZonePlus v1 and looks better

2 Likes

You can find an in-depth breakdown of how v2 zones work at the Method page.

It sounds as if you’re using partEntered when you likely instead want to use playerEntered. Player-detection utilises only region and raycast checking; it doesn’t use .Touched connections.

For v2, zones act as a collective therefore a lot of the time zones aren’t performing the region/raycast checks, it’s the players themselves. Because of this it’s impossible to check for zones that have parts outside of workspace.

Zones are fully compatible with both R6 and R15. If you’re experiencing issues feel free to file a bug report and we can take a look.

4 Likes

For ease of use we no longer force users to name their zones although it should be easy-as setting a name property when the zone is constructed then checking for this later on:

local zone = Zone.new()
zone.name = "SoundZoneForest"
zone.playerEntered:Connect(function(player)
    print(("player '%s' entered zone '%s'!"):format(player.Name, zone.name))
end)
7 Likes

Oh I mean, I have many parts in the folder and each of them has a name based on “their” music, however I can’t find any way of getting the part name in the API so I directly asked you if it’s possible. Sorry for not explaining correctly.

1 Like

When you say folder do you mean the group folder containing the baseparts that construct the zone? You may be looking for the zone.groupParts property which returns an array of all group baseparts that make-up the zone.

Alternatively, do you want to retrieve the name of the individual music part the player is touching? If so, it sounds like you’d be better off constructing a zone for each individual part (the group parameter can now take individual parts in addition to models, folders, etc).

4 Likes

Alright I’ll be sure to try that, thanks!

Hey, could you provide any benchmarks if you have ran any, to validate the efficiency of this module statistically? I’m unsure how fast this module would be precisely, especially when handling servers with 300+ (possibly up to 700) active players.

Also, will you consider switching to @pobammer’s Janitor module? it is much more performant than Maid and is cleaner overall.

1 Like

funny enough i have a version of this i made like friday that uses janitor

2 Likes

sounds like ATLA, good work lol

1 Like

The zone detection methodology varies quite significantly depending upon different factors, such as the events you use, total volume of zones, total volume of characters in a server, etc, therefore you can’t really give a precise benchmark for the module as a whole.

If you’d like to run a rough benchmark then I’d recommend opting for the most common player-detection method of checking each player, which involves constructing a RotatedRegion3 of character size (typically 4x2x6), using all zone group parts in the game as the whitelist, then calling that every accuracy interval (which is typically ‘High’) for how many players you wish to test in the benchmark.

Likely not for ZonePlus as the performance gains are completely negligible; maybe for future projects with its greater feature set

4 Likes

Great project!

Only thing i think is missing is a better tutorial on everything, a lot of people might be new to programming or so, then maybe having more detailed explanations would be better.

4 Likes

Is there any way to just check for HRP instead of the entire player for playerExited?

2 Likes