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.
COMMUNITY QUESTION
Can I hide COREGUI for only one player?
1 answer
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.
This discussion is preserved as it was. New answers, comments, and votes are closed.

1 comment
You could just turn it on and off again in that current code for the Died event.