Skip to content

Instantly share code, notes, and snippets.

@modster
Created October 16, 2021 18:29
Show Gist options
  • Save modster/dc2cb133e1ba718ee2fde8e68853457a to your computer and use it in GitHub Desktop.
Save modster/dc2cb133e1ba718ee2fde8e68853457a to your computer and use it in GitHub Desktop.
ZonePlus Example
-- https://1foreverhd.github.io/ZonePlus/
-- Assuming we place ZonePlus in ReplicatedStorage
local Zone = require(game:GetService("ReplicatedStorage").Zone)
local container = workspace.SafeZoneContainer
local zone = Zone.new(container)
zone.playerEntered:Connect(function(player)
print(("%s entered the zone!"):format(player.Name))
end)
zone.playerExited:Connect(function(player)
print(("%s exited the zone!"):format(player.Name))
end)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment