Game Statistics is a simple logger for your Roblox games. It allows you to set up discord webhooks to send server information to a discord channel. This information includes player counts, revenue, errors, and the server’s uptime.
How to Use:
Go ahead and grab the model here.
Next, insert it into your game and move it to the ServerScriptService.
Open the script called “StatisticsHandler”.
Find the settings section of the script (it is one of the first sections).
Next, update the settings to your liking. The only one you must fill out is the DiscordWebhook. If you do not know how to create a webhook, check out this post. The others I would recommend leaving as their defaults, but that is up to you. A proxy is also already provided, due to the recent blockage of Roblox to Discord webhooks. However, if you want to use your own that option is also there.
Once you have done that, you are all set. To test, simply change the testing value at the bottom of the settings to true (and don’t forget to change it back after you are done testing). Then start play testing, and once you have loaded in, end the play test. Then head over to the channel where you linked the webhook. You should see something like this:
I didn’t exactly design this module to be customized (unless you have scripting experience of course, then it is pretty basic). However, I will do my best to outline how-to for those of you who can not script.
First, head over to the Functions script, which is found under the main StatisticsHandler script.
Next, head down to the very bottom of the script. Here you will find
module.serverClose, which is called when the server is closing. At the very bottom of that function, you will see the formatting for the Discord message.
This is where you will modify how the message comes through to discord. I don’t really know what else to explain here, as it is just basically strings. However, if you do not already know, when calling variables in a string you would do the following:
"this variable "..variable.." is in the middle of a string" variable.." this variable is before a string" "this variable is after a string"..variable
I hope that is helpful, but feel free to ask any questions and I would be happy to assist.
I hope you all find this useful. If you have any questions or need help in any way feel free to ask on this post. Also make sure to check out my recent plugin, found here.
Disclaimer: The proxy I have used can be found here. I do not own or run it, however it does appear to be reliable.