this script in starter player scripts that doesnt put a chat when player dies, its also supposed to choose a random death chat, idk how to make work help plz
local plrName = game.Players.LocalPlayer.Name
local function chat(message)
if game.Players.LocalPlayer.Humanoid.Health == 0 then
game.StarterGui:SetCore("ChatMakeSystemMessage", {Text = message, Color = Color3.fromRGB(255, 255, 255), Font = Enum.Font.SourceSansBold})
end
local messages = {"(Server): bruh" .. plrName .. " just died", "(Server): " .. plrName .. " was grounded", "(Server): wow" .. plrName .. " is so bad at this game" }
while true do
chat(messages[math.random(1, #messages)])
end
end
