Looking to make a detain tool that logs who arrests who

Alright, so I have a fairly simple detain tool and I’m trying to make it log who arrests who somewhere, does anyone have any ideas on how I could do this? Thanks!

You could have a table of logs and save it to a datastore.

1 Like

When you say “logging”, do you mean via a webhook?

I don’t mind where it saves it to, but a webhook would be a good place to put it.

You should not use a Discord webhook for logging as Discord is not a logging service.

1 Like

How would I access the datastore after it logs something?

Webhooks were MADE for logging, and they can’t afford to be ingame 24/7, they can be on Discord all the time. Like Me. I use loads of webhooks to log actions in my games, and nobody complains about anything.

@aLev1tate You can do :GetAsync() to get the logs you saved.

@gxenious Webhooks were made for sending one-way messages to Discord, not logging. If you abuse webhooks, the webhook may be deleted and your server/account may be punished.

1 Like

Discord has an issue with it. They in the past have blocked API requests from Roblox’s domain due to improper use in the past. Using Webhooks for logging information is going to build up API requests very quickly on popular games.

Discord themselves wants webhooks to be used to send occasional messages or updates about things (GitHub for example). Using them to log something that could build up lots of requests isn’t a good idea. They were not intended to be used at the high API request rates that a datastore would need.

Although Discord allows webhooks to be used from Roblox their is not many good use cases other than possibly allowing player’s to send a “mod call” request to a game’s moderators (obviously this should have a long cooldown).

Although Discord is widely used and free which makes it very accessible to use their API it should be used with respect since high request rates can lead to issues on their end.


What other option would you suggest?

You could use a DataStore like @COUNTYL1MITS suggested but I would make sure to only store recent arrests since DataStores do have their limits in how much they can save. Also you would want to be careful with preventing exploiters from rapidly detaining a person since then your DataStore requests will be throttled. So if you take the DataStore approach I would only store a player’s most recent arresets (30 or less) and make a cooldown for your DataStore requests.

But depending on how important these arrests are this could just be something that is stored on the server the arrest occurred in and can be reviewed by I presume your moderators if needed in the server the incident took place in.

1 Like