I know this has been brought up before but I couldn’t find any solutions
when a player dies within a zone the localplayerexited (and I’m assuming playerexited too) doesnt fire meaning that all the other zones just stop working (as the game thinks you are still in the zone that you died in), this happens whether or not the player respawns inside a zone
if anyone had a way to stop this from happening I would be very grateful as I dont know how to do it myself
edit
i have solved this issue by putting my script itno startplayerscripts
is the localscript under starterplayerscripts or startercharacterscripts? try putting it on startercharacterscripts because those reset whenever the player dies.
When you get there, do update. Would be happy to contribute to the codebase if you’re looking to open source it. We use zones pretty extensively in our game and have been dealing with a lot of pain points in regards to how ZonePlus works currently
I am currently restructuring a bit of it to make the parallel optional (unfortunately).
Id be happy to have you contribute. @iisato on the other place…
We have introduced ZonePlus in our latest update with 4 zones being used in different places, and it has been a disaster in production. Servers are running slow time to time, and making the game completely unplayable in some circumstances.
Sometimes, external actions can take up to 2 minutes to actually process. For example, a member of our moderation team used the :fly command on Adonis, which took a very very long time until it actually worked. Theres also recordings of vehicles in our game Car Parking Level 7 going into each other, flinging them out of areas etcetera.
Looking at the creator dashboard experience performance showed that RunService.Heartbeat is taking a extremely long time to process (up to 670ms!)
We do not use RunService.Heartbeat in any of our scripts. While we may use RunService.Heartbeat:Wait() or anything else, nothing else directly connects to it except ZonePlus.
The drops to 3ms is the attempt to find the cause of these spikes, restarting servers constantly with new and more patches, with no success. We have only gotten as far to disabling a script that also uses ZonePlus but does not affect player experience which seemed to of improved the stability of our servers.
As shown below, the previous server framerate was usually around 40-58 FPS, however now sits around 6-36 FPS.
I hope this message reaches to Ben or anyone else who can look into this and fix this as soon as possible. We have since rescripted affected services to no longer us ZonePlus for the time being.
This sadly does not seem to be the case seeing how it cannot even handle 4 zones within our game.
I have taken some time to post this message to make sure that it is ACTUALLY ZonePlus causing the server performance downfall. These are the results after removing ZonePlus entirely:
I can confirm this, recently one of my games had a huge downgrade in the server physics fps and it was hard to find the problem, it was a line of GetPartBoundsInBox that was used on each Heartbeat. Turns out that when I solve the main problem the Zone plugin started using a lot of memory as well, it uses the same thing that caused problems in my game, which is the use of GetPartBoundsInBox in each Heartbeat.
@ForeverHD are there plans to solve the recent performance issues? The module has basically become useless as of late, which sucks to see because it used to be extremely useful.
An item will be automatically untracked if destroyed or has its parent set to nil.
This is so false… I don’t know why or how, but none of the tracked items are being removed from the trackedItems table.
For each player that has visited the game it’s 350~ instances. There are at least 1000 players visiting the server over the course of a day. The server is literally dying from this memory leak.
I merely run a loop with workspace:GetPartInParts() now.
I don’t know if it’s less performant, but there’s definitely no memory leakage now.
Until ZonePlus is fixed to be more performant, i have developed my own ZoneController module:
Sample code:
local Players = game:GetService('Players')
local ReplicatedStorage = game:GetService('ReplicatedStorage')
local modules = ReplicatedStorage.Modules
local networkEvents = ReplicatedStorage.NetworkEvents
local templates = ReplicatedStorage.Templates
local ZoneController = require(modules.OOP.ZoneController)
local QueryOptions = ZoneController.QueryOptions
local queryOptions = QueryOptions.new()
queryOptions.QueryForPlayers = true
queryOptions.QueryForPartsAndModels = false
local innerSpaceZone = ZoneController.new(script.Parent, "InnerSpace", queryOptions)
innerSpaceZone.PlayerEntered:Connect(function(player)
player:SetAttribute("IsInInnerSpace", true)
end)
innerSpaceZone.PlayerExit:Connect(function(player)
player:SetAttribute("IsInInnerSpace", false)
end)
It doesnt use any heartbeat connections, just a while loop with a Heartbeat:Wait().
I find that it works really smooth, if anyone is experiencing performance issues using ZonePlus, feel free to use this.
Hello, how to set the zone in CanQuery = false without breaking the script? (I created a pressure plate that detects the player with a Zone that opens a door) Thanks !