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

Hi, you can find more details here and here:

The settingsGroupName doesn’t impact its properties directly, you could name the group "RedZones" for example for the exact same effect.

When calling bindToGroup, if the settingsGroupName hasn’t been created before it automatically creates it internally for you. There’s only one property right now, onlyEnterOnceExitedAll , which defaults to true.

We’ve designed it this way in case we wish to add additional properties in the future.

1 Like

Hi ForeverHD! I am a big fan! Ok Sorry that’s off topic.

ok, so I do not need to define any groups in advance.
Once I use zone:bindToGroup, I automatically get the behaviour - onlyEnterOnceExitedAll=true, no matter what group name I use?

That’s all correct yep, you get the default behaviour (i.e. onlyEnterOnceExitedAll=true) no matter what name you use :+1:

1 Like

Thank you
I am going to use the zones (inside a LocalScript) to change the ambient sound when the player walks in a different part of the map. I am going to put a zone at the “door” between the zones, which will trigger the change of the sound when the player passes through it.
I see that there is a possibility to set the Accuracy of the zone. I wondered whether I should use Medium, because the change of sound is not that critical if it happens with a little delay.
However if the player travels through the border zone faster than 0.5 sec. is it possible that the zone event never triggers?
If such thing is possible, then I probably will leave it by default to High accuracy (10 checks per second). Performance wise is this still better compared to using the Touched event in the LocalScript?

Yes it’s typically best to avoid touched events for reasons mentioned in these threads:

ZonePlus utilises whitelists and spatial queries which have been highly optimised internally by Roblox. If you’re using localPlayer events you’ll be absolutely fine with any Accuracy, including ‘Precise’.

If you used a low accuracy and ran through a narrow zone then yes it is possible that the item or player is not detected at all.

3 Likes

Hello, I don’t know know if this has already been answered, but I am wondering if there is a way that I can get the name of the individual zone that the player has entered?

Example:

zone = Zone.new(FolderWithMultipleParts)

The Folder with multiple parts has 5 zones named zone1, zone2, zone3, zone4, zone5 respectfully.
So these 5 individual zones are parts in the folder: FolderWithMultipleParts

When I enter one of the zones is there a way that I can access zone3 for example from the function

zone.playerEntered:Connect(function(player)
– Access the specific zone here?
end

Are there any functions I can call that can achieve this?

I tried running a loop through the zones folder and calling zone:findPart(), but it returned all the zones instead of the one zone that my player had entered.

Any advice/guidance would be very appreciated.

Thank you!

You can use a dictionary table to achieve this:

local zonesDictionary = {}
for _, container in pairs(folderWithMultipleParts) do
   local zone = Zone.new(container)
   zonesDictionary[container.Name] = zone
end

local zone1 = zonesDictionary.zone1
local zone2 = zonesDictionary.zone2
etc
2 Likes

I have this issue where I teleport the player inside the zone and it doesn’t register as the player being inside the zone when I use findPlayer()

(It returns false even though I’m inside the zone)

Can you share a roblox place file of this please so I can take a look

1 Like

I log in and out, it works fine but when I reset and go back to the zone, the script seems to stop working. I don’t know if there is something missing in the script to make it work.

local ZoneModule = require(game.ReplicatedStorage.Zone)
local Zone = ZoneModule.new(workspace.Zone1)
local Update = Zone.autoUpdate --[default: "true"]

local color = workspace.Zone1["Body Colors"]


Zone.localPlayerEntered:Connect(function(player)
	print(player.name.. " AMPUTAR")
	local char = player.Character or player.CharacterAdded:Wait()
	local clone = color:Clone()
	clone.Parent = char
end)

Zone.localPlayerExited:Connect(function(plr)
	print(plr.name.. " AMPUTAR mas saiu do lugar")
	local paint = "Body Colors"
	local char = plr.Character
	local clone = color:Clone()
	clone.Parent = char
end)

Where is your script set at? Is it set in the StarterCharacter or somewhere else?

Starter Character.
EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE(Need this so I could do the 30 minimum world.)

Have it set inside StarterPlayer instead.

2 Likes

Thank you for your help.


1 Like

Hello, I have a question. How do I make a zone which sets a GUI to visible and invisible when exiting but only on the player that’s on the zone? I’m trying to make a shop zone but I do not know how you make a gui visible and invisible using zone+ since I do not really know how to code.

i got u fam
shopgui.rbxm (8.2 KB)
download this and make sure to drag and drop it into “StarterGui” inside the explorer

also make sure to have a part called “ShopPart” inside the workspace
and you can make changes to the script if you want to

2 Likes

This helps a lot, thanks for the help!

I’m having issues using Zone Plus… It seems like Zone Plus doesn’t work after a player has died. When I try going to a zone after dying it doesn’t do anything it’s supposed to do. The zones work but only if the player hasn’t died yet. How do I fix this issue?

Why is there a delay when a player enteres a zone on the PlayerEntered event and PlayerExited?