I'm making my own Roblox chat function from scratch

Hi. About 3 days, I decided to make my own Roblox chat function which works like the stock function. I’ve been analyzing the core scripts for the stock function, as well as any instances used with it. There was a lot that went into it, and I wasn’t going to look through everything in one go. So, I only looked at what I thought was important.

And now, 3 days later, I have this:

Things that are included:

  • chat/message class that I made myself. Used to manage speakers and their messages
  • Message replication client and server side
  • Message shown visually across all clients

Things I want to add:

  • Censoring system
  • Scrolling of chat log when chat log gets too big
  • Chat channels (something I saw while read stock chat scripts)
  • Chat colors (also something I saw while read stock chat scripts)
  • Ability to press enter key to send message

I am not the best at UI design. I can make it functional, but not pretty.

What are your thoughts on this system? Anything is welcome.


This is just a suggestion to adding the ability to press the enter key for sending a message,
you could use Textbox.FocusLost:Connect(function)
as a function for when the focus is lost.

1 Like

I see. Does pressing the enter key make the textbox lose focus?

Yes it does but when you loose focus of the textbox (As in click away), It would run the function.
But it could still work.

1 Like

hmm, kinda neat! I feel like this would be great for team games. One big concern I have is, would this take up too much screen space on mobile? Like when it isn’t hidden it feels like it might be a little big for on mobile. I don’t know if this is a pc exclusive thing or not though. Just my feedback, take it how you want it!

1 Like

I see. Thanks for the info.

ignore: xxxxxxxxxxx

Its not that hard to re-size the GUI for any device but if there is a GUI with many children then you may hit a problem with placing the GUI back to where it originally was.

I haven’t actually checked the scaling on both PC and mobile yet, so I’m not quite sure.

Well ItsJord_yn I hope I helped a aspect of your nicely designed system ,
this project you are working on could be big so I wish you the best of luck with your work. :smiley:

1 Like

Thanks a lot :+1:

ignore: xxxxxxxxx

Do you not use TextService:FilterStringAsync? Or are you adding a block list on top of the TextService filtering?

I didn’t know TextService was a thing. I was actually going to find another way to filter the text.

1 Like

It is currently 12 AM for me, so I won’t reply to anything until I wake up in the morning.

Yep, it is! Roblox requires user created text, like chat messages and pet names, to be filtered. If you don’t filter text, your game will more than likely be taken down at some point.

From the Text and Chat Filtering developer article:

Because filtering is so crucial for a safe environment, Roblox actively moderates the content of games to make sure they meet certain standards. If a game is reported or automatically detected to not use filtering, that game will be shut down until the developer takes the proper steps to apply filtering.

The article linked above also gives you examples on how you can properly apply Roblox’s filtering system.

1 Like

Looks cool, nice job on the custom chat

1 Like

Update April 15th

I managed to get message censoring working thanks to @Gamenew09
He recommended TextService as a way to censor messages, which is what I’m using now.

1 Like