1ForeverHD / ZonePlus

Construct dynamic zones that utilise region checking, raycasting and the new BasePart.CanTouch property to effectively determine players and parts within their boundaries.
https://devforum.roblox.com/t/zone/1017701
MIT License
74 stars 115 forks source link

🐛 ZonePlus running in infinite error loop due to this #43

Closed TheLegendarySpark closed 2 years ago

TheLegendarySpark commented 2 years ago

This error led to the module being in a neutral state whereas it no longer fires the itemEntered event and other events. image

I'd like to address this major issue because one time when I was restoring the map in Adonis, I saw that the folder ZonePlusServerContainer was destroyed in the Workspace. The module constantly kept trying to reparent the folder; as a result, it made countless errors, filling up the console with errors and less debug prints.

1ForeverHD commented 2 years ago

You need to ensure you're calling :destroy() on all zones before running the restore command. This will ensure all connections (such as the Heartbeat loop in this example) are cleaned up via the janitors. What's happening currently is your zone's internal tracker part is being destroyed by Adonis which is throwing an error as the zone is still active and trying to modify a locked instance.