ComplexRegions
Properties
Region
ComplexRegions.Region:
Region
The Region class is exposed on the API but should typically be instantiated
with the createRegion
function.
local regionInstance = Instance.new("Part")
local region = ComplexRegions.Region.new(regionInstance)
Functions
createRegion
Helper function that will create a Region, set its whitelist, and also listen for instances entering and leaving.
Usage:
local region = ComplexRegions.createRegion(workspace.Region, {
Players.LocalPlayer.Character
})
region.entered:Connect(function(instance: Instance)
print(instance, "entered the region")
end)
region.left:Connect(function(instance: Instance)
print(instance, "left the region")
end)