Detection Engine API Reference
Engine APIReporting custom violations, querying violation counters, and registering detector telemetry.
# Overview
The DetectionEngine module (ServerScriptService/RAC/Core/DetectionEngine.luau) coordinates incident reporting across all 15 detectors and manages per-player incident dossiers.
# Method Index
# DetectionEngine.RegisterIncident(player: Player, incident: Types.IncidentReport)
Submits a violation report from a detector or game script:
local DetectionEngine = require(game.ServerScriptService.RAC.Core.DetectionEngine)
DetectionEngine.RegisterIncident(player, {
detectorName = "CustomZoneDetector",
category = "Movement",
severity = "High",
confidence = 0.90,
evidence = "Entered restricted VIP boundary without pass.",
metadata = {
zoneId = "VIP_Vault",
attemptedCFrame = tostring(player.Character.HumanoidRootPart.CFrame),
},
})
# DetectionEngine.GetConsecutiveViolations(userId: number, detectorName: string): number
Returns the count of consecutive ticks that the player has violated the specified detector without a clean tick.
# DetectionEngine.ClearPlayerCounters(userId: number)
Resets all violation counters and consecutive anomaly trackers for the specified player (called automatically upon player disconnection).
# Next Steps
- Explore BindableFunction API.
- Learn how to build Custom Detectors.