We use cookies on this site to enhance your user experience
Lua Chat System — Client API — ChatSettings
Lua Chat System — Client API — ChatSettings
The ChatSettings is a dictionary of settings for the client-side of the Lua Chat System. They are stored in a ModuleScript
named ChatSettings, which can be found inside of the Chat
game service, under the Folder
named ClientChatModules. The module may be required and its properties can be cahgned during run-time.
To change a setting, require this module using a LocalScript
in the following manner:
-- Require the ChatSettings module (wait for it to load)
local Chat = game:GetService("Chat")
local ClientChatModules = Chat:WaitForChild("ClientChatModules")
local ChatSettings = require(ClientChatModules:WaitForChild("ChatSettings"))
-- Change settings like you would with any other table.
ChatSettings.MaximumMessageLength = 100
Chat Behavior Settings
WindowDraggable
- Type: bool
- Default:
false
- Description: Determines whether the ChatWindow is
GuiObject/Draggable|Draggable
.
WindowResizable
- Type: bool
- Default:
false
- Description: Determines whether the ChatWindow may be resized by the player
ShowChannelsBar
- Type: bool
- Default:
false
- Description: Determines whether the ChatWindow will display the ChatChannelsBar, which allows the player to switch channels.
GamepadNavigationEnabled
- Type: bool
- Default:
false
- Description: Determines whether gamepads can navigate chat UI.
ShowUserOwnFilteredMessage
- Type: bool
- Default:
true
- Description: Determines whether players should see the filtered version of their chat messages, or the original content they typed in.
ChatOnWithTopBarOff
- Type: bool
- Default:
false
- Description: Determines whether the chat UI is enabled even if the topbar is disabled.
BubbleChatEnabled
- Type: bool
- Default:
game:GetService("Players").BubbleChat
- Description: Determines whether bubble chat is enabled.
ClassicChatEnabled
- Type: bool
- Default:
game:GetService("Players").ClassicChat
- Description: Determines whether classic chat is enabled.
Chat Text Size Settings
ChatWindowTextSize
- Type: int
- Default:
18
- Description: Determines the size of the text in the ChatWindow.
ChatChannelsTabTextSize
- Type: int
- Default:
18
- Description: Determines the size of the text in the chat channel tabs in the ChatChannelsBar.
ChatBarTextSize
ChatWindowTextSizePhone
- Type: int
- Default:
14
- Description: Determines the size of the text in the ChatWindow for phones.
ChatChannelsTabTextSizePhone
- Type: int
- Default:
18
- Description: Determines the size of the text in the chat channel tabs in the ChatChannelsBar for phones.
ChatBarTextSizePhone
Font Settings
DefaultFont
- Type: Font
- Default:
Enum.Font.SourceSansBold
- Description: Determines the default
TextLabel/Font|Font
of the ChatWindow.
ChatBarFont
- Type: Font
- Default:
Enum.Font.SourceSansBold
- Description: Determines the default
TextBox/Font|Font
of the ChatBarTextBox
.
Color Settings
BackGroundColor
- Type: Color3
- Default:
Color3.new(0, 0, 0)
- Description: Determines the
GuiObject/BackgroundColor3|BackgroundColor3
of the ChatWindow.
DefaultMessageColor
- Type: Color3
- Default:
Color3.new(1, 1, 1)
- Description: Determines the default
TextLabel/TextColor3|TextColor3
of ChatMessages in the ChatWindow.
DefaultNameColor
- Type: Color3
- Default:
Color3.new(1, 1, 1)
- Description: Determines the default
TextLabel/TextColor3|TextColor3
of speaker names of ChatMessages in the ChatWindow.
ChatBarBackGroundColor
- Type: Color3
- Default:
Color3.new(0, 0, 0)
- Description: Determines the
GuiObject/BackgroundColor3|BackgroundColor3
of the ChatBar.
ChatBarBoxColor
- Type: Color3
- Default:
Color3.new(1, 1, 1)
- Description: Determines the
GuiObject/BackgroundColor3|BackgroundColor3
of the ChatBarTextBox
.
ChatBarTextColor
- Type: Color3
- Default:
Color3.new(0, 0, 0)
- Description: Determines the
TextBox/TextColor3|TextColor3
of the ChatBar.
ChannelsTabUnselectedColor
- Type: Color3
- Default:
Color3.new(0, 0, 0)
- Description: Determines the
GuiObject/BackgroundColor3|BackgroundColor3
of an unselected chat channel tab in the ChatChannelsBar.
ChannelsTabSelectedColor
- Type: Color3
- Default:
Color3.new(30/255, 30/255, 30/255)
- Description: Determines the
GuiObject/BackgroundColor3|BackgroundColor3
of the selected chat channel tab in the ChatChannelsBar.
DefaultChannelNameColor
- Type: Color3
- Default:
Color3.fromRGB(35, 76, 142)
- Description: Determines the
TextButton/TextColor3|TextColor3
of the default channel’s name in the ChatChannelsBar.
WhisperChannelNameColor
- Type: Color3
- Default:
Color3.fromRGB(102, 14, 102)
- Description: Determines the
TextButton/TextColor3|TextColor3
of whisper channels’ names in the ChatChannelsBar.
ErrorMessageTextColor
- Type: Color3
- Default:
Color3.fromRGB(245, 50, 50)
- Description: Determines the
TextLabel/TextColor3|TextColor3
of error messages.
Window Settings
MinimumWindowSize
- Type: UDim2
- Default:
UDim2.new(0.3, 0, 0.25, 0)
- Description: Determines the smallest possible size of the ChatWindow (given that WindowResizable is enabled).
MaximumWindowSize
- Type: UDim2
- Default:
UDim2.new(1, 0, 1, 0)
- Description: Determines the largest possible size of the ChatWindow (given that WindowResizable is enabled).
- Notes: If this is changed to be greater than the full screen size, strange things start to happen with size/position bounds checking.
DefaultWindowPosition
- Type: UDim2
- Default:
UDim2.new(0, 0, 0, 0)
- Description: Determines the default position of the ChatWindow.
DefaultWindowSizePhone
- Type: UDim2
- Default:
UDim2.new(0.5, 0, 0.5, (7 * 2) + (5 * 2))
- Description: Determines the default size of the ChatWindow on phones.
DefaultWindowSizeTablet
- Type: UDim2
- Default:
UDim2.new(0.4, 0, 0.3, (7 * 2) + (5 * 2))
- Description: Determines the default size of the ChatWindow on tables.
DefaultWindowSizeDesktop
- Type: UDim2
- Default:
UDim2.new(0.3, 0, 0.25, (7 * 2) + (5 * 2))
- Description: Determines the default size of the ChatWindow on desktop.
Fade Out and In Settings
ChatWindowBackgroundFadeOutTime
- Type: float (seconds)
- Default:
0.5
- Description: Determines how long fading out the ChatWindow background should take.
ChatWindowTextFadeOutTime
- Type: float (seconds)
- Default:
30
- Description: Determines how long fading out the ChatWindow text should take.
ChatDefaultFadeDuration
- Type: float (seconds)
- Default:
0.8
- Description: Determines how long fading out chat UI elements should take.
ChatShouldFadeInFromNewInformation
- Type: bool
- Default:
false
- Description: Determines whether the chat should fade in when receiving new messages.
ChatAnimationFPS
- Type: float
- Default:
20.0
- Description: Determines the framerate of fading animations in the chat UI.
Channel Settings
GeneralChannelName
- Type: string
- Default:
"All"
- Description: Determines the name of the default channel.
EchoMessagesInGeneralChannel
- Type: bool
- Default:
true
- Description: Determines whether messages to channels other than the default channel ought to be echoed into the default channel.
ChannelsBarFullTabSize
- Type: int
- Default:
4
- Description: Determines the number of tabs that may be present in the ChatChannelsBar before it begins to scroll.
MaxChannelNameLength
- Type: int
- Default:
12
- Description: Determines the maximum length of a channel name before it is truncated.
RightClickToLeaveChannelEnabled
- Type: bool
- Default:
false
- Description: Determines whether a channel may be exit by right-clicking on the channel’s tab in the ChatChannelsBar.
MessageHistoryLengthPerChannel
- Type: int
- Default:
50
- Description: Determines the maximum number of ChatMessage that may be displayed in a chat channel.
ShowJoinAndLeaveHelpText
- Type: bool
- Default:
false
- Description: Determines whether the help text for joining/leaving channels is shown.
Message Settings
MaximumMessageLength
- Type: int
- Default:
200
- Description: Determines the maximum length of ChatMessages.
DisallowedWhiteSpace
- Type: array<string>
- Default:
{"\n", "\r", "\t", "\v", "\f"}
- Description: Determines the whitespace characters that are disallowed.
ClickOnPlayerNameToWhisper
- Type: bool
- Default:
true
- Description: Determines whether the player can click on another player’s name to engage in a whisper chat with them.
ClickOnChannelNameToSetMainChannel
- Type: bool
- Default:
true
- Description: Determines whether the player can click on a channel’s tab to set it as their main channel.
Miscellaneous Settings
WhisperCommandAutoCompletePlayerNames
- Type: bool
- Default:
true
- Description: Determines whether the whisper command should auto-complete player names.
Events
SettingsChanged
- Parameters: string
settingName
, VariantnewValue
- Description: Fires when a setting with the given
settingName
is changed tonewValue
.