PcoWSkbVqDnWTu_dm2ix
We use cookies on this site to enhance your user experience
Collapse Sidebar

SetChatStyle

The SetChatStyle sets whether BubbleChat and ClassicChat are being used, and tells TeamChat and Chat what to do using the ChatStyle enum. Since this item is protected, attempting to use it in a Script or LocalScript will cause an error.

This function is used internally when the chat mode is set by the game.

If you would like to create a custom chat system where you can define custom functions such as these, take a look at the tutorial here.

Parameters

Name Type Default Description
Classic

The specified chat style being set.

Returns

Return Type Summary

No return.


Code Samples


Setting a Player's Chat Style

This example demonstrates that the Players/SetChatStyle function executes without error if using the Command Bar or a Plugin and errors if executed in a LocalScript.

When executed in the Command Bar, this code sets the chat style to Classic using the Enum/ChatStyle enum.

-- Command bar
game.Players:SetChatStyle(Enum.ChatStyle.Classic) -- Set's chat style to Classic

-- LocalScript
local player = game.Players:SetChatStyle(Enum.ChatStyle.Classic) -- Errors