What do you want to achieve? Keep it simple and clear!
Connect to the MessageReceived event on the server and have it fire when a player speaks in chat.
What is the issue? Include screenshots / videos if possible!
The event does not fire on the server but on the client it does.
What solutions have you tried so far? Did you look for solutions on the Developer Hub?
Tried asking in the ROBLOX discord server. Searched wide and far in the wiki and bunch of devforum posts which had no answers.
local TextChatService = game:GetService("TextChatService")
TextChatService.MessageReceived:Connect(function()
print("hi")
end)
You still can do the MessageReceived function in client side, then fire a remote to send it in server side and do your thing. ^^
Create a “Remote Event” in Replicated storage, name it “RemoteChat”
Local Script:
local TextChatService = game:GetService("TextChatService")
local Event = game.ReplicatedStorage:WaitForChild("RemoteChat" ,30)
if Event ~= nil then
TextChatService.MessageReceived:Connect(function()
Event:FireServer()
end)
end
Script:
local Event = game.ReplicatedStorage:WaitForChild("RemoteChat" ,30)
if Event ~= nil then
Event.OnServerEvent:Connect(function(Player)
print("Hi ".. Player)
end)
end