ZonePlus v3.2.0 | Construct dynamic zones and effectively determine players and parts within their boundaries

I believe you have to manually track an object for itemEntered but.for partEntered it fires regardless

1 Like

It is ready for a public release…

Can somone please help me my script does not work –
local ZoneModule = require(game.ReplicatedStorage.Zone)
local part = script.Parent:FindFirstChild(“Zone”).ZonePart

if part then
local zone = ZoneModule.new(part)

local function updatePlayerCount()
    local players = zone:getPlayers()
    local playerCount = #players
    local textLabel = script.Parent.Cube.Roof.Part.BillboardGui:FindFirstChild("Attendants | Text")
    if textLabel then
		textLabel.Text = "Attendants: " .. playerCount .."/8"
    else
        warn("TextLabel 'Attendants | Text' not found")
    end
end

zone.playerEntered:Connect(updatePlayerCount)
zone.playerExited:Connect(updatePlayerCount)

updatePlayerCount() 

else
warn(“Zone part not found”)
end