Hello
Where can I find some examples about the settings group names, which can be used in zone:bindToGroup?
I found example of using zone:bindToGroup(“EnterOnlyOneZoneAtATime”)
but what is the exact effect of this?
what are the other possible Groups? Are these pre-defined or I have to define them?
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.
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?
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.
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.
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
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)
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’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?