Since my last post, now when I call .Chatted on players in a LocalScript, it only catches the LocalPlayer’s messages.
What’s your script?
game.Players.PlayerAdded:Connect(function(plr)
plr.Chatted:Connect(function(msg)
print(plr.Name .. ": " .. msg)
end)
end)
Only prints my messages.
That’s because if you join after other people join, the Players.PlayerAdded event won’t be triggered for the people who are already in the game.
To make it work for everyone, switch out your script with this:
--//Services
local Players = game:GetService("Players")
--//Functions
local function OnChatted(player)
player.Chatted:Connect(function(message)
print(player.Name.. ":", message)
end)
end
for i, player in ipairs(Players:GetPlayers()) do
OnChatted(player)
end
Players.PlayerAdded:Connect(function(player)
OnChatted(player)
end)
No, I also did that, sorry forgot to say it. But the .Chatted still only fires for me.
This .Chatted event worked in my local script yesterday. Today it’s broken.
It works for me. That’s pretty weird why it’s not working for you.
Does it work for other players? I know it works for the LocalPlayer, but that’s it
I believe since its a local script, its only going to show only on your client.
So I can’t get other players chat’s through a local script? It let me yesterday…
yes, game.Players.PlayerAdded will only get your player I believe.
Another way you can do this is with the use of remote events from server to client
Ah. Yeah I could do that. Do you believe this was an intentional fix or a bug?
Can confirm that this broke a few of my things. Taking a look at this changelog for yesterday’s update, I think the culprit here is
TextChatService APIs will no longer function when TextChatService.ChatVersion is set to anything other than Enum.ChatVersion.TextChatService
But that’s just a guess, at the moment I’m unsure as to why it’s broken myself. Doesn’t seem to be intentional.
Edit: I need to clarify that Player.Chatted in general just simply doesn’t work, no matter if you’ve tried to use it on players that have joined before you or not.
The .Chatted
scent will ONLY detect the local player since it’s client sided (used by a local script) use it on a Server (normal) script and it will work
But this isn’t how it used to function since 2 days ago. This seems to be an unintended side effect of the most recent update since I can’t find any intentional note of change for this anywhere. This could easily break quite a few games that rely on LocalScripts for their custom chat, and Roblox would at least alert developers to update their scripts before they make a change like this. I think it’s reasonable to assume this is a bug.
They use local scripts to CUSTOMIZE chat FONTS and not to detect when a player talks, it still functions the same way.
That still doesn’t change the fact that this isn’t how Player.Chatted worked since 2 days ago, and this change has absolutely nothing noted anywhere. I still think this deserves at least an official response about the change if it is intentional. Otherwise, until then, I think it is proper that this is marked as a bug.
It never worked like that, it is for customization and not detecting the thing that OTHERS chatted.