I've tried doing a chat log using Tables and bindable functions,but it didn't turn out very efficient and the tables would mess up the order if someone chatted,so whats the most efficient way to make a Chat log or to make this thing more efficient?
My Test Chat Log thing:
Chatlog = {} ------------------------------ InsertChat = script.InsertChat PrintChatLog = script.PrintChatLog ------------------------------ function InsertChat.OnInvoke(Chat,Boolean) if Boolean == true then table.insert(Chatlog,#Chatlog,Chat) return Chat end end ------------------------------ function PrintChatLog.OnInvoke() for i,v in pairs (Chatlog) do print(v) end end ------------------------------
Separate script:
game.Players.PlayerAdded:connect(function(Player) Player.Chatted:connect(function(Message) ------------------------------------------------ InsertChat = game.workspace.ChatLog.InsertChat PrintChatLog = game.workspace.ChatLog.PrintChatLog ------------------------------------------------ InsertChat:Invoke(Message,true) wait() PrintChatLog:Invoke() end) end)
I use the output in my place to test it.
i realize this is a very old post but this will help if people look at the post. this thread might help if you're willing to use discord. https://scriptinghelpers.org/questions/64504/why-wont-my-join-logchat-log-script-work-in-the-real-game