I've been trying to make a chat message pop up when a player dies. For some reason, the chat message won't pop up? I've tried replacing variables, datatypes, ect. Nothing I've done works. If anyone could help me, I would greatly appreciate it. I've spent too long on this.
game.Players.LocalPlayer.Character.Humanoid.Died:Connect(function()
local m = 2
local player = game.Players.LocalPlayer
if m == 2 then
game.StarterGui:SetCore("ChatMakeSystemMessage", {
Text = (player.Name.." has died.");
})
end
end)

2 comments
so what you want? you want him to chat that he died whenever he died?
if what u want is that he chat then use this game:GetService("ReplicatedStorage").DefaultChatSystemChatEvents.SayMessageRequest:FireServer(player.Name.."has died.", "All")