Thank you, friend.This has nothing to do with ZonePlus,
It is caused by the character moving on the MeshPart
I did a quick check and it seems like the server allocated almost 400 MB to the ZoneController script if it is anything related.
When I am entering zone, Heartbeat falls down to 17 from original stable 60.
Used this in a weapons script to create safe zones where players couldn’t get damaged by the guns. I used one giant zone for this, as I only needed one for the functionality. The game it was used in is quite big, with a lot of scripts, but after putting in ZonePlus, servers were crashing after a couple of hours with insane memory usage (up to 900mb after an hour and a half.)
We tried several tests (mainly just removing it and put it back in a few times) and we narrowed down that ZoneController was the thing that was taking up all that memory. Not sure what is going on here, but I thought it’d be best to let you know about it here.
I really like how simple the module is to use, and it’s a shame that we had to remove it. If you have any questions for conditions, etc. then I’m willing to provide more information about the circumstances it was used in!
Edit:
Hold on, I just realised this has been updated since I last used it! Oops! I’ll try it out again and I’ll let you know as to whether the issues persist in this version!
Is this normal?
@nakata1609 @caviarbro @coded_jkl These aren’t results we’ve discovered in testing although I’ve DMd you so we can explore further.
This is fine yep as they’re anchored/hidden/tiny parts associated to each zone. For the next update we’ll be moving them into an organised folder within a WorldModel inside Replicated/ServerStorage, and then only generating them on a need-only basis.
PR: Add way to link 3rd party modules (such as Janitor) through ObjectValues (I don’t want to have multiple of them, neither I want to overwrite things every update)
With this addition I would be able to just link the modules every update and delete built in ones.
Great module, love it!
(This post was a bug I had but it’s fixed now)
This does not seem to work with characters using skinned mesh parts, is there something extra I’m supposed to do?
How’s the new version holding up for you? I’ve noticed the scripts with simple part checks that are only a few lines with this module tend to cause a good amount of memory.
Is there a reason your characters Head is an Accessory instead of a MeshPart?
Currently it assumes if a character contains a HumanoidRootPart and a Head, then that head must be a BasePart, although I can change this behaviour if needed.
@LuaMolecule Can you provide further details? For example, your zone code, snapshots of your server/client memory (search ‘Zone’ into the console), etc.
With coded_kjl we’re narrowed down a small leak which would occur over many hours. This will be patched once I’m back in a few days, although shouldn’t impact you in a noticeable way.
Yea it’s mb, our morphs are set up as so.
v3.2.0
We highly recommend all users update to this latest version as it patches a memory leak which occurred from the reapplying of character bodyparts.
On to more exiting notes, this release also introduces two heavily requested methods:
zone:onItemEnter and zone:onItemExit which track a specific item until it has entered/exited the zone, then calls the given callbackFunction
.
local item = character:FindFirstChild("HumanoidRootPart")
zone:onItemEnter(item, function()
print("The item has entered the zone!"))
end)
local item = character:FindFirstChild("HumanoidRootPart")
zone:onItemExit(item, function()
print("The item has exited the zone!"))
end)
This is useful for scenarios where you may only want to listen for an item entering/exiting a zone after a certain trigger, instead of constantly.
@coded_jkl Thanks for your help with this, it should be resolved now. Feel free to message again if any usual results pop up.
@imdednowgoaway This is now organised
@LordMerc Non-basepart Heads (such as accessory heads) are now supported
Just a random question here, what do you think is the best way to make sub zones, such as a boss areas that exist within one main zone? I was able to do it but I’m doubting its performance
Assuming the zones contain the same type of part (e.g. block, sphere, etc), 10000 zones are going to be almost identical in performance to 1 zone since all zones act as a collective (and since checks are typically performed on players/characters/items, not the zones themselves).
Sorry if I asked a stupid question but does that mean if I use ZonePlus in my game, do I have to credit and link this thread in my game description?
Sorry if this has been asked before, but I was just wondering if zone.playerExited
also activates if a player is inside the zone and then leaves the game. I am wanting to make a queue to enter a game, and I need to be able to detect if a player has left the zone via leaving the game
Overall, SUPER helpful module and I can’t believe I haven’t been using this prior, seriously, kudos man to your entire team of developers that created this!
It does
Awesome! Thanks for checking that for me!