Zone+ v1 (deprecated) | Retrieving players within an area/zone

@saSlol2436 DM’d to look into it further

@DeathLilian Assuming you setup your zones on the client (e.g. using a LocalScript within StarterPlayerScripts) and utilise methods like zone:initClientLoop() (instead of initLoop) then this is perfectly fine :+1:

You can find a coded example of an ambient system here:

2 Likes

Thank you so much @ForeverHD!!

@ForeverHD
Also is there a way to replace sounds to lighting/atmosphere inside the script? (I just come back to Roblox after few months break)

You can modify the properties and children of lighting within game:GetService("Lighting") then use TweenService:create to transition these in and out. Feel free to ask in #help-and-feedback:scripting-support for anymore general help!

1 Like

@ForeverHD Ah okay I was thinking about making a planet system with this but I can’t figure it out how to get it worked.

Hello!

I’ve recently started messing with this a system a bit, and noticed the topic of “performance”. In an attempt to reduce the lag or performance that may be caused, I’ve changed the value of the loopdelay on row 297 on the “Zone” script, from 0.5 to a higher value. How greatly would this improve performance? Does it improve performance at all?


(where I’ve edited the script)
Thanks!

Increasing the delay from 0.1 to 1 second for example will reduce checks by 540 per minute (600 to 60). This will improve performance however the significance of this depends on a few factors you’ll have to test and determine yourself. You can find more about these under ‘Best Practises’

2 Likes

Hello, i am having issues with your module.

The previewed part is my zone but it only fires playerentered event when i stand on the wooden platform, do you have any idea why this happened? i think zone+ is conflicting with the terrain.

I checked my scripts multiple times and i can guarantee you that its not my scripting error

Edit: I tried to make my platform bigger and it still behaved like it did before, I think its my issue but do you have any idea why it happened?

Edit2: I copied my platform made it bigger turned off cancollide and made it a zone now it behaves like i want so yeah problem solved ignore this post

Can you make it so you can make it search through a table of Instances for createZones instead of an instance container?

I have some NPC’s and not all their parts is the Zone I want so I store them in a table.

Sure thing, you can do this for v2 which takes containers (models, folders, etc as before), a single basepart or tables, as you need, for the ‘group’ argument:

(Note: v2 has a completely new API, we’ll officially release next week)

1 Like

Just checked it out, works amazing. Thanks.