I'm trying to make a generic copy of murder mystery, got everything down but I need to make sure dead players can't chat.
You're going to want to use the SetCoreGuiEnabled
method of the StarterGui.
In a LocalScript:
local Player = Game.Players.LocalPlayer if not Player.Character then Player.CharacterAdded:wait() end Player.Character.Humanoid.Died:connect(function() Game.StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.Chat, false) end)
You'll still have to turn chat back on when they are spawned into the game, again from a LocalScript, but that code will disable the chat for someone that has died.