EndMovementException - Revoke a Movement Exception
End an active movement exception for a player using the token returned by BeginMovementException. Also covers ClearMovementExceptions and IsMovementExempt.
Once the movement you authorized has finished, call EndMovementException to remove the exception immediately rather than waiting for its timer to expire. This page also covers ClearMovementExceptions, which removes every active exception for a player at once, and IsMovementExempt, which lets you query whether a player currently holds an exception.
EndMovementException
End a single active movement exception identified by its token.
Signature
Trace.EndMovementException(player, token) -> boolean
Alias: Trace.RevokeMovementException(player, token)
Parameters
playerPlayerrequiredThe Player instance whose exception you want to remove.
tokenstringrequiredThe token returned by BeginMovementException when the exception was created.
Returns
booleantrue if the exception was found and successfully removed. false if no matching exception
existed for that player and token (for example, if it had already expired or been cleared).
Example
local token = Trace.BeginMovementException(player, {
Duration = 0,
Reason = "Cutscene",
})
-- ... cutscene plays ...
Trace.EndMovementException(player, token)
ClearMovementExceptions
Remove all active movement exceptions for a player - both timed and manual - in a single call.
Signature
Trace.ClearMovementExceptions(player) -> boolean
Parameters
playerPlayerrequiredThe Player instance whose exceptions should all be removed.
Returns
booleantrue on success.
Example
-- Useful at round end or when a player forcibly leaves a vehicle.
Trace.ClearMovementExceptions(player)
IsMovementExempt
Check whether a player currently holds an active movement exception, optionally filtering by a specific check name.
Signature
Trace.IsMovementExempt(player, check?) -> boolean
Parameters
playerPlayerrequiredThe Player instance to query.
checkstring?The name of a specific anticheat check to query. Valid values are "Teleport", "Velocity",
"Fling", "Fly", and "Noclip". If omitted, the function returns true if the player holds
an exception for any check.
Returns
booleantrue if the player currently has a matching active exception, false otherwise.
Example
if Trace.IsMovementExempt(player, "Fly") then
print("Player is currently exempt from Fly detection")
end