I created some simple code to test ZonePlus by @ForeverHD, but I’m having a problem. My code loops through a folder of zones, each zone is a model with a part in it, when it loops through the folder it creates a zone for each of those models and prints something when a player is added to the zone or leaves the zone, but nothing is ever printed, I’m receiving no errors.
Here’s my code:
wait(3)
local zones = script.Parent:GetChildren()
local ZonePlus = require(4664437268)
local ZoneService = require(ZonePlus.ZoneService)
for i, model in pairs(zones) do
local zone = ZoneService:createZone("zone_n_" .. tostring(i), model, 30)
zone.playerAdded:Connect(function(player)
print(player.Name .. " added")
end)
zone.playerRemoving:Connect(function(player)
print(player.Name .. " removed")
end)
end