GUI Chater | Help

Hello, I’m trying to make a button make you say a phrase in the chat when it is hit. This is for a cafe, so the message I would put would be like welcome.

I have been looking around the dev form and everything I found did not work with what I needed like legacy chat instead of TextChatService.


Have a good day
– (Dylan) DylanandMarley

2 Likes

Hey there! I am not sure whether you need a script for he Legacy ChatService or TextChatService but this script should run for both:

game:GetService("ReplicatedStorage").DefaultChatSystemChatEvents.SayMessageRequest:FireServer("[Your message]", "all")

Just make sure you run this script from the client side. Hope this helps!

1 Like

I’m using legacy chat,

When I click the button, it does not do anything. When I load into the game, it has what i put and then disappears.

1 Like

I think I found you a solution in a different post. Check it out here.

The issue with that is that is the old chat system.

To do this with the new TextChatService, you can use this code:

game:GetService("TextChatService"):WaitForChild("TextChannels"):WaitForChild("RBXGeneral"):SendAsync("Message")

Version Using Variables

local textChatService = game:GetService("TextChatService")
local textChannel = textChatService:WaitForChild("TextChannels"):WaitForChild("RBXGeneral")
local message = "Message Here"

textChannel:SendAsync(message)

If you are still using Legacy ChatService, you can use SayMessage.