A simple 5 step guide to making timed system chat messages!

Hello,
This is a simple guide to make system chat messages (The ones that happened every so often)

  1. First, create a LocalScript and place it in StarterPlayer > StarterPlayerScripts.

  2. We will be using the TextChatService and TextChannels so we will insert the following line of code:

local TextChannels = game:GetService("TextChatService"):WaitForChild("TextChannels")
  1. Once you have done that, we will create a table full of our messages. (You can use a ModuleScript for this if you really want too)
local messages = {
	"Custom Message One!",
	"Custom Message Two!",
	"Custom Message Three!",
}
  1. Now we can really bring our creation to life. We will add a loop that will select a message at random and send the message in the roblox chat.
while wait(120) do -- Change the number in wait() to delay the messages. Is in seconds.
	local pickMessage = messages[math.random(1, #messages)]
	TextChannels.RBXSystem:DisplaySystemMessage(pickMessage)
end
  1. To use custom colours and fonts you can edit the message with HTML. For example, to turn a message a nice blue colour you can change a message in the messages table to this. (You can find more on HTML Text Formatting here)
"<font color='#00C3FF'> Custom Message Four! </font>",



Our final script should look something like this!

local TextChannels = game:GetService("TextChatService"):WaitForChild("TextChannels")

local messages = {
	"Custom Message One!",
	"Custom Message Two!",
	"Custom Message Three!",
	"<font color='#00C3FF'> Custom Message Four! </font>",
}

while wait(120) do -- Change the number in wait() to delay the messages. Is in seconds.
	local pickMessage = messages[math.random(1, #messages)]
	TextChannels.RBXSystem:DisplaySystemMessage(pickMessage)
end

Please give this post a like if this helped you out, and feel free to ask any questions here and I will try and help you as soon as I am able too!

9 Likes

Wait is deprecated so you’d use task.wait

3 Likes

Thank you! I was unaware of this.

1 Like

Your welcome, I used it and that made the whole script work.

1 Like

TYTY you just saved me SO much time (I been looking for a working script for about 2 hours TwT)

Haha now problem! Enjoy the script :slight_smile: