Object Tracker & Area Manager
OT&AM is a module that handles the interaction between my other modules. The main purpose of OT&AM is that it can track objects and gives you onLeave/onEnter events when that object interacts with an area. It’s similar to Zone+ only this module supports not only the player but any object, further more it has many more features and it scales much better.
Automatic proximity sensor door
Why should you use it
local module = require(game:GetService("ServerStorage"):WaitForChild("OT&AM")) -- require the module local a1 = module.addArea("SafeZone", workspace:WaitForChild("Zone")) -- add an Area a1.onEnter:Connect(function(player) -- add listener , it returns the player obj as param since, autoAddCharacter feature sets the player as ObjectKey print(player.Name.." entered!") end) a1.onLeave:Connect(function(player) -- add listener print(player.Name.." left!") end)
local module = require(game:GetService("ServerStorage"):WaitForChild("OT&AM")) -- require the module module.Settings.Heartbeat = 10 -- set another heartbeat module.Settings.FrontCenterPosition = true -- turn on this feature module.setAutoAddCharacter(false) -- disable autoAddCharacter feature
OT&AM works by tracking the position of a giving instance. It uses PiP (Point in Polygon) to detect if an object is inside an Area.
Basically, every Heartbeat (the one u set in settings) it loops over each area and checks if an object is inside of it using PIP. Based on that it generates the events.