You can use a chat logging system, for example, all my servers keep a log of the last 1,000 messages sent; which is then logged to a datastore when the game shuts down.
All my games have a
unique server identifier which is shown when servers are shutdown, players are banned, etc. so that way I can pull the logs from my administration panel.
If you would like a tutorial, I can provide one.
2. Example of server log
The server log includes a table of chat history, as well as other things like errors (via script context) and prints (via a custom system I have, not sure if you could also pull these from context) and administration logs; basically anything really.
3. How a Unique Server ID works
When a new server is being created, the server will reserve a random string and check it’s not already taken, then when the server shuts down, it stores a table log which it constantly updates while the server is running as part of it’s
4. How to access it
You could make an administration GUI to access these logs, which is what I do. My admin gui also has a few other things, like managing all-server broadcasts, remote/timed shutdowns, etc.
If there’s anything in my post that doesn’t make sense to you, I’m more than happy to explain.