v1uxz
(v1uxz)
August 16, 2023, 6:22pm
#1
I am basically trying to disable the player’s chat upon joining the game and enable it later but my script to disable it is not work, I placed the script inside of StarterPlayerScripts which is located inside of a LocalScript and for some reason it won’t work. The script and output message is below;
game.Players.PlayerAdded:Connect(function(player)
game:GetService("StarterGui"):SetCoreGuiEnabled(Enum.CoreGuiType.All, false)
end)
3 Likes
Doomcolp
(dxxmed)
August 16, 2023, 6:23pm
#2
I’m pretty sure that SetCoreEnabled doesn’t work with Server scripts (correct me if I’m wrong).
1 Like
Im pretty sure it is best to disable the chat on a Client Script, inside of StarterGui .
Here is the code, for the client script:
local gui = game:GetService("StarterGui")
task.wait()
gui:SetCoreGuiEnabled(Enum.CoreGuiType.Chat, false)
3 Likes
v1uxz
(v1uxz)
August 16, 2023, 6:26pm
#4
I didn’t use a ServerScript, the script is inside of a LocalScript.
v1uxz
(v1uxz)
August 16, 2023, 6:27pm
#5
Thank you I will try it out now.
system
(system)
Closed
August 30, 2023, 6:27pm
#6
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.