How do I change the font in :Chat()?

https://developer.roblox.com/en-us/api-reference/function/Chat/Chat
If I were to use this function, would it be possible to change the text font?

I took a look at the documentation and it doesn’t look like you can do this with this function.
Are you trying to change the font for bubble chat or the default chat or both?

It’s possible to achieve this by listening for children to be added to the default ‘BubbleChat’ gui, this ‘ScreenGui’ instance acts as a container for all of the drawn chat bubbles.

local Enumeration = Enum
local Game = game
local Chat = Game:GetService("Chat")
local Players = Game:GetService("Players")
local Player = Players.LocalPlayer
local Character = Player.Character or Player.CharacterAdded:Wait()
local PlayerGui = Player:FindFirstChildOfClass("PlayerGui") or Player:WaitForChild("PlayerGui")
local BubbleChat = PlayerGui:FindFirstChild("BubbleChat") or PlayerGui:WaitForChild("BubbleChat")

local function OnChildAdded(Child)
	if not (Child:IsA("BillboardGui")) then return end
	local BillboardFrame = Child:WaitForChild("BillboardFrame", 1)
	if not BillboardFrame then return end
	local ChatBubble = BillboardFrame:WaitForChild("ChatBubble", 1)
	if not ChatBubble then return end
	local BubbleText = ChatBubble:WaitForChild("BubbleText", 1)
	if not BubbleText then return end
	BubbleText.Font = Enumeration.Font.LuckiestGuy
end

BubbleChat.ChildAdded:Connect(OnChildAdded)
Chat:Chat(Character, "Hello world! ######") --Hashtags necessary to display the whole 'Hello world!' message.

image

This also permits you to choose a chat color which isn’t restricted by the ‘ChatColor’ enumeration list.
https://developer.roblox.com/en-us/api-reference/enum/ChatColor

Further documentation about modifying the bubble chat’s settings can be found here.

2 Likes