TextChatService는 다른 플레이어 음소거, 아바타 이모티콘 사용 등 일반적인 용도를 위한 내장 채팅 명령어를 제공합니다. Studio의 속성 창에서 CreateDefaultCommands를 true로 설정하여 이를 활성화할 수 있습니다.
또한 TextChatCommand를 사용하여 사용자 정의 명령어를 추가할 수 있습니다. 채팅 입력창에 정의된 명령어를 입력한 사용자는 TextChatCommand.Triggered로 정의된 콜백을 트리거하여 사용자 지정 작업을 수행하게 됩니다.
다음 예시는 플레이어가 /super 또는 /mini를 입력할 때 캐릭터의 크기를 증가 또는 감소시킬 수 있는 채팅 명령어를 만드는 방법을 보여줍니다.
TextChatService 안에 TextChatCommand 인스턴스를 추가합니다.
이름을 SizeCommand로 바꿉니다.

PrimaryAlias 속성을 /super로 설정하고, SecondaryAlias를 /mini로 설정합니다.

채팅 명령어의 콜백을 정의하여 캐릭터의 크기를 조정하는 다음 Script를 ServerScriptService 안에 삽입합니다:
Scriptlocal TextChatService = game:GetService("TextChatService")local Players = game:GetService("Players")local sizeCommand: TextChatCommand = TextChatService:WaitForChild("SizeCommand")sizeCommand.Triggered:Connect(function(textSource, message)local scaleMult = 1local messageWords = string.split(message, " ")if messageWords[1] == "/super" thenscaleMult = 2elseif messageWords[1] == "/mini" thenscaleMult = 0.5endlocal player = Players:GetPlayerByUserId(textSource.UserId)if player thenlocal character = player.Characterif character thenlocal humanoid = character:FindFirstChildWhichIsA("Humanoid")if humanoid thenfor _, child in humanoid:GetChildren() doif child:IsA("NumberValue") thenchild.Value *= scaleMultendendendendendend)