flatbedj/roblox-skills

roblox-textchat-channels

Use when building custom chat for a Roblox game — multiple named chat channels shown as switchable TABS (e.g.

소스 보기

사용 방법

  1. 설치 명령을 복사하고 자신의 에이전트 환경에 설치하기 전에 소스 패키지를 확인하세요.
  2. 필요한 도구, 인증 정보, 지원 환경은 원본 문서에서 확인하세요.
  3. 입력과 원하는 산출물을 설명하고 출처와 결과를 대조하세요.
npx skills add https://github.com/flatbedj/roblox-skills --skill roblox-textchat-channels

시작 전 확인

  • 설치에는 모델 구독, API 한도, 파일 접근 권한이 포함되지 않습니다.
  • 별점 수와 설치 수는 활동 지표이며 독립적인 품질·보안 검증이 아닙니다.
원본 Skill 문서

원본 저장소의 제목, 예시, 코드, 표, 링크, 이미지를 유지해 표시합니다.

Roblox custom chat: channels, tabs, cross-server

Modern games use TextChatService (ChatVersion = TextChatService). Here's how to get real, switchable channel tabs and cross-server delivery — the non-obvious parts.

Two channels shown as TABS (the key that's OFF by default)

The modern default chat merges everything into one window UNLESS you enable channel tabs. Two settings, best set as place properties in Edit mode (setting them at runtime is too late — the chat server boots first — and can break the default wiring):

  • TextChatService.CreateDefaultTextChannels = false — drop the default RBXGeneral/System tabs so you get EXACTLY your channels.
  • TextChatService.ChannelTabsConfiguration.Enabled = true — this is the switch that makes channels appear as tabs. ChannelTabsConfiguration is an auto-created child of TextChatService. Once on, each custom `TextChannel` auto-becomes a tab labelled by its `Name` — no per-channel config needed.

⚠️ Both are place properties → they need a place SAVE to persist across sessions. Also set them in ChatService.start() at runtime as a fallback, but the Edit-mode/place value is what reliably takes effect on boot.

Creating the channels (server)

With CreateDefaultTextChannels = false, the TextChannels container is NOT auto-created. So:

lua
local container = TextChatService:FindFirstChild("TextChannels")
if not container then
    local f = Instance.new("Folder"); f.Name = "TextChannels"; f.Parent = TextChatService; container = f
end
-- Tab order = CREATION order (there is NO reorder API — it's an open devforum feature request).
-- Create the channel you want leftmost FIRST.
local here   = Instance.new("TextChannel"); here.Name   = "Here";   here.Parent   = container
local global = Instance.new("TextChannel"); global.Name = "Global"; global.Parent = container

Add every player to each channel on join so they can read + type: channel:AddUserAsync(player.UserId) (creates their TextSource; pcall-guard it; it yields, so calls run in order).

Displaying messages into a channel (client)

textChannel:DisplaySystemMessage(richText) shows a message on the calling client only, in that channel's tab. Use it to render a game-event feed (pulls, announcements) into a specific tab. RichText works — but escape user-supplied text first (s:gsub("&","&amp;"):gsub("<","&lt;"):gsub(">","&gt;")) or players can inject </font> tags.

Cross-server (chat or an event feed) via MessagingService

DisplaySystemMessage is local-only, and normal channel delivery is per-server. To go cross-server:

  • Event feed (e.g. broadcast a rare drop to all servers): on the event, MessagingService:PublishAsync(TOPIC, payload) with payload.j = game.JobId. SubscribeAsync(TOPIC, ...) on every server; when data.j ~= game.JobId (another server), fire a RemoteEvent to local clients → they DisplaySystemMessage it. Fire the LOCAL copy instantly via FireAllClients and skip your own JobId in the subscriber to avoid a double.
  • Cross-server player chat: set the channel's ShouldDeliverCallback (runs on the SERVER per recipient) — relay the message once (dedupe by message.MessageId) via MessagingService:PublishAsync, and return true to still deliver locally. Other servers receive it and DisplaySystemMessage it for their clients (local = native message, remote = system message; acceptable).
  • Always `pcall`-guard MessagingService — it errors when API access is off (Studio) or rate-limited (~150 + 60×players msgs/min per topic). Then the feature degrades to in-server only instead of crashing.

Testing caveats

  • Cross-server can't be tested in solo Studio (one server) — MessagingService round-trips to self only. Verify the in-server path (channels exist, player is a member, DisplaySystemMessage renders) and wire the cross-server path carefully.
  • Fire a fake event via Net.event("X"):FireAllClients(payload) from the Server datamodel, then screen_capture the chat (the window pops on a new message) to confirm formatting + which tab it lands in.

Lesson

Before declaring "the platform can't do X" for chat/UI, check create.roblox.com/docs and the devforum — the modern chat is more capable than it first looks (channel tabs, gradients, configs all exist). Docs: create.roblox.com/docs/chat/chat-window ; devforum "Channel Tabs & UI Gradient Now Available in TextChatService".

관련 작업

같은 저장소의 Skills

더 많은 Skills

모든 Skills
flatbedj
커뮤니티

luau-best-practices

Use when writing, reviewing, or refactoring Luau code for Roblox - modules, services, controllers, error handling (pcall), memory leaks and connection cleanup, server-authoritative security, input validation, naming conventions, or project organization. Triggers include "best practices", "clean code", "code review", "refactor", "memory leak", "server authority".

설치 수
1
GitHub Stars
0
업데이트
9월 20일
flatbedj
커뮤니티

roblox-networking

Use for Roblox multiplayer communication across the client-server boundary: designing RemoteEvent, UnreliableRemoteEvent, and RemoteFunction flows; validating client requests; handling replication-aware gameplay; applying rate limits and anti-exploit checks; reasoning about network ownership, server-authority patterns, Input Action System use in authoritative gameplay, and streaming-sensitive multiplayer correctness.

설치 수
1
GitHub Stars
0
업데이트
9월 20일
flatbedj
커뮤니티

roblox-cloud

Use for Roblox Open Cloud and external integration work: choosing API-key-based authentication for server-to-server automation, constructing and troubleshooting Open Cloud REST requests, checking scopes and rate limits, determining whether HttpService can call an endpoint, setting up webhook receivers, and using Roblox OpenAPI and reference JSON artifacts for tooling or client generation.

설치 수
1
GitHub Stars
0
업데이트
9월 20일
flatbedj
커뮤니티

roblox-game-marketing-art

Create and refine Roblox game discovery icons and thumbnails using this user's visual preferences, reference research, and approved-art continuity. Use for promotional artwork, not in-game GUI design.

설치 수
1
GitHub Stars
0
업데이트
9월 20일