I am trying to find an equivalent to the Legacy Chat’s Speaker:SayMessage()
in the new TextChatService.
My current code is similar to the following:
local ChatService = require(game.ServerScriptService:WaitForChild("ChatServiceRunner"):WaitForChild("ChatService"))
local RemoteEvent = game.ReplicatedStorage.RemoteEvent
RemoteEvent.OnServerEvent:Connect(function(player, msg)
local speaker = ChatService:GetSpeaker(player.Name)
if speaker then
speaker:SayMessage(msg, "All", {})
end
end)
I want to change this to TextChatService but the ChatServiceRunner module is only available in the old chat. Is there any way to replicate this behavior where the game can send a message in chat on the player’s behalf?
Note: I have looked into ChatService:Chat()
but this does not add a message to the chat window so it is not the behavior I am looking for.
Thanks in advance