I have created this script with refernce from wiki.roblox.com
local StarterGui = game:GetService('StarterGui')
StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.Chat, false)
I am trying to disable chat but it will only disable when I click test run. It will not disable in the real game when you click play?
Anyone explain?

5 comments
Where did you put this script?
Server Script Service
Put the script in start gui. And use script.parent. Because you are using locals on a "startgui" I think, u needed to use the "PlayerGUI".
it Works As Of 2018
Go to the chat service and turn off load default chat, then you don't need a script hogging up resorces and it doesn't begin to load