Could the error be here? I'm not a programmer, but I see that the other zones are deleted, but `mainzone` isn't. And what I see is that it doesn't have the same name. Following the example of the others that have the same name:
So this is the original code:
CreateZone(pos, "mainzone", "main", (radius - 25).ToString(), tier1);
CreateZone(pos, "2zone", "2zone", (radius - 15).ToString(), tier2);
CreateZone(pos, "4zone", "4zone", radius.ToString(), tier3);
var sp = CreateSphere(pos, radius, 1);
timer.Once(20f, () =>
{
RemoveZones("2zone");
RemoveZones("mainzone");
RemoveZones("4zone");
DestroySpheres(sp);
});
It may have to go like this:
CreateZone(pos, "mainzone", "mainzone", (radius - 25).ToString(), tier1);
CreateZone(pos, "2zone", "2zone", (radius - 15).ToString(), tier2);
CreateZone(pos, "4zone", "4zone", radius.ToString(), tier3);
var sp = CreateSphere(pos, radius, 1);
timer.Once(20f, () =>
{
RemoveZones("2zone");
RemoveZones("mainzone");
RemoveZones("4zone");
DestroySpheres(sp);
});