This script is located in a normal script in workspace.
game.Players.PlayerAdded:connect(function(nP)
nP.Chatted:connect(function(msg)
local gcolor = nP.TeamColor
if gcolor == game.Teams.Host.TeamColor then
if msg == "!bubble" then
game.Players:SetChatStyle(Enum.ChatStyle.Bubble)
elseif msg == "!classic" then
game.Players:SetChatStyle(Enum.ChatStyle.Classic)
elseif msg == "!classicbubble" or "!bothchats" then
game.Players:SetChatStyle(Enum.ChatStyle.ClassicAndBubble)
end
end
end)
end)
Gives this error: The current identity (2) cannot SetChatStyle (lacking permission 1). Is there a way to fix or get around this error?

1 comment
You can't use :SetChatStyle() in a localscript or a serverscript.