EventTracker | Documents

EventTracker | Beta | Documents

Current Version: 1.21 Beta
Document Version: 1.21 Beta
Resource Post: EventTracker | Beta
Model/Module: https://create.roblox.com/store/asset/109290221378018/EventTracker

The Module Itself.

The module itself comes with two functions, TrackEvent, and TrackFunction.


Notes:
You can use require(109290221378018) to access the modules current version without putting the module into your studio project


:TrackEvent()
Returns: RemoteEventTracker (Custom Type)
Arguments: {RemoteEvent:RemoteEvent}

:TrackFunction()
Returns: RemoteFunctionTracker (Custom Type)
Arguments: {RemoteFunction:RemoteFunction}


RemoteEventTracker

A RemoteEventTracker is a custom type that can be created via the module by using :TrackEvent(RemoteEvent).

List of mentions below:

  • Event: the RemoteEventTracker.RemoteEvent property
  • Tracker: the RemoteEventTracker

Properties

RemoteEvent
Default: nil
Description: This is the RemoteEvent that the Tracker will track, rather simple. (This value can be updated)

EventsPerSecondLimit
Default: 10
Description: The amount of events a client can fire per second for this event before OnLimitExceeded is fired

ExcludeUsers
Default: {}
Description: A list of users that the tracker will ignore, thus it doesnt matter how many times they trigger the event, the user will remain unaffected.

Enabled
Default: true
Description: If the Tracker is enabled

ManuallyCreated
Default: true
Description: If the Tracker was created manually, currently has no use, but may be used in the future.


Signals

EventTriggered
Default: signal
Description: Triggers every time the event is fired, and the user firing it hasnt exceeded the limit.
Arguments: {Player:Player, …}

OnLimitExceeded
Default: signal
Description: Triggers anytime a user exceeds the the EventsPerSecondLimit for the event
Arguments: {Player:Player, TriggersWithinLastSecond:number, PassedArguments:any}


Functions

Destroy
Description: Destroys the Tracker


RemoteFunctionTracker

A RemoteFunctionTracker is a custom type that can be created via the module by using :TrackFunction(RemoteFunction).

List of mentions below:

  • Function: the RemoteFunctionTracker.RemoteFunction property
  • Tracker: the RemoteFunctionTracker

Properties

RemoteFunction
Default: nil
Description: This is the RemoteFunction the Tracker uses.

EventsPerSecondLimit
Default: 10
Description: The amount of events a client can fire per second for this function before OnLimitExceeded is fired

ExcludeUsers
Default: {}
Description: A list of users that the tracker will ignore, thus it doesnt matter how many times they trigger the function, the user will remain unaffected.

Enabled
Default: true
Description: If the Tracker is enabled

ManuallyCreated
Default: true
Description: If the Tracker was created manually, currently has no use, but may be used in the future.

OnServerInvoke
Default: nil
Description: If set to a function, said function will be triggered every time the function is triggered and the user who fired it hasnt exceeded the EventsPerSecondLimit, It sends these arguments to said function: {Player:Player,…}. Along with that make sure the function returns, even if its doesnt return anything, its good practice.


Signals

OnLimitExceeded
Default: signal
Description: Triggers anytime a user exceeds the the EventsPerSecondLimit for the function
Arguments: {Player:Player, TriggersWithinLastSecond:number, PassedArguments:any}


Functions

Destroy
Description: Destroys the Tracker


Created by @FroDev1002

2 Likes