Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How can I make a chat logger in my game?

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.

2 comments

0

What would this be useful for?

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

1 answer

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)

5 comments

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.

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

0

When I script the thing (and get a discord account, as I dont have one yet XD)

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.

This discussion is preserved as it was. New answers, comments, and votes are closed.