RB-004
Roblox chat welcome message script
Shows a welcome line in the chat window when a player joins.
- Script type
- LocalScript
- Where it goes
- StarterPlayer > StarterPlayerScripts
- Category
- GUI
For your own game in Roblox Studio. Not for use in other people's games.
The code
-- Chat welcome message: a system line in the chat window, shown only to this player.
local MESSAGE = "Welcome to my game! Have fun."
local TextChatService = game:GetService("TextChatService")
local StarterGui = game:GetService("StarterGui")
if TextChatService.ChatVersion == Enum.ChatVersion.TextChatService then
-- New chat system (the default for new games).
local channels = TextChatService:WaitForChild("TextChannels", 10)
local general = channels and channels:WaitForChild("RBXGeneral", 10)
if general then
general:DisplaySystemMessage(MESSAGE)
end
else
-- Old chat system. The chat may need a moment to load, so try a few times.
for _ = 1, 10 do
local ok = pcall(function()
StarterGui:SetCore("ChatMakeSystemMessage", {
Text = MESSAGE,
Color = Color3.fromRGB(255, 220, 80),
})
end)
if ok then
break
end
task.wait(1)
end
endHow to set it up
- Open StarterPlayer, then StarterPlayerScripts.
- Add a LocalScript there and paste the code.
- Change MESSAGE to your own welcome text.
- Play and open the chat window (the speech bubble icon, top left). The message is there.
Change it
- Only the joining player sees the message. Other players do not.
- If the message does not appear, check that chat is turned on in the game (StarterGui settings and TextChatService).
- Keep the message short. Long ones wrap and look messy.
More in GUI
More Roblox tools
- Shirt and pants templatesFree Roblox clothing templates to download: hoodies, jerseys, jeans, joggers and more.
- Robux tax calculatorWork out what you receive after the marketplace fee, or what to charge.
- Robux to USD calculatorConvert earned Robux to dollars at a DevEx rate you can edit.
- Shirt and pants template makerColour each panel of the 585×559 clothing template and download it.
- Username generatorGenerate usernames that fit the 3–20 character rule.