Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How can I make a chat logger in my game?

Asked by 6 years ago

So I created a small game with a custom chat, so I can chat with my friends without the annoying chat filters: https://www.roblox.com/games/1323598693/RZS-ChatRoom The next step how I want to improve this is by adding a chat logger, which record everything anyone said, and then shows it when I need it. The logger probably should only record, idk, 200 chats, maybe?

I believe a DataStore is the solution, however I don't know how or where to start. I looked over a few tutorials, however those are regarding saving data for invidivial players, not the whole game.

I heard that DataStores have limits to how much data they hold, so wouldn't very long chats havge a problem saving?

I know this is not a request site, however I'm not asking for a script. Just ideas, maybe some tutorial suggestions, or perhaps a DataStore would not work, so what would? Pretty much anything would help. Thx.

0
What would this be useful for? hiimgoodpack 2009 — 6y
0
So I have some record of what was chatted, for evidence reasons. Like if someone said something, I can prove that they said it RiskoZoSlovenska 378 — 6y

1 answer

Log in to vote
0
Answered by
baxzzi 42
6 years ago

You can try recording them into discord like I do, it doesn't tag any messages. All you need to do is create a webhook for a channel.


local url = "https://discord.osyr.is/api/webhooks/WEBHOOK GOES HERE" -- Discord text channel webhook URL local http = game:GetService('HttpService') game.Players.PlayerAdded:connect(function(plr) plr.Chatted:connect(function(msg) local data = { ['username'] = plr.Name, ['content'] = msg } local newdata = http:JSONEncode(data) http:PostAsync(url,newdata) end) end)
0
https://www.youtube.com/watch?v=GhOa0eZZeEY I'd say you should watch alvin's custom chat video. Modify it to log 200 chats. I don't think you'd want to data store the chat. The chat log will still be there in the server until it shuts down. Delude_d 112 — 6y
0
Wait so this log will presist even if the server shuts down? And my custom chat system does not use the default roblox chat system, but its basically 10 guis stacked on top of each other, and a few scripts move text from then bottom one to the top when you press a button, so idk if plr.Chatted would work. But I think I can make things work out with this, thx a lot. I'll accept ur answer when i do RiskoZoSlovenska 378 — 6y
0
When I script the thing (and get a discord account, as I dont have one yet XD) RiskoZoSlovenska 378 — 6y
0
I put it in a while true script and put a wait of one second but it repeats the same message in the discord multiple times. Moocow86 0 — 5y
Ad

Answer this question