Chat Bridge
Connect Discord and Roblox chat so messages flow both ways — in-game chat appears in Discord, and Discord messages appear in Roblox.
Overview
The Chat Bridge creates a two-way conversation between your Discord server and your Roblox game. It uses two complementary mechanisms to stay within Roblox's rate limits:
- Discord → Roblox — uses Roblox Open Cloud MessagingService
publishMessage. Each Discord message becomes one publish call. Roblox allows 1,000 publishes/minute per universe, so this is safe even at high chat volume. - Roblox → Discord — the bot polls a single DataStore entry (
outbound) once every 5 seconds per game. Roblox allows 1,000 DataStore reads/minute per universe; 12/minute leaves plenty of headroom. Messages are batched on the Roblox side into a single DataStore write every 3 seconds, so Roblox never makes an HTTP call per chat message.
The only Supabase read happens once per minute (the bot caches the linked-games list for 60 seconds). No per-message HTTP or Supabase traffic is generated on either side.
Prerequisites
- Discord bot added to your server (use the "Add Discord Bot" button on the dashboard).
- Roblox Open Cloud API key with Data Store Read, Data Store Write, and Messaging Service scopes.
- Roblox Game Settings → Security: Enable Studio Access to API Services (required for DataStore and MessagingService in Studio).
- Works with both TextChat (v2) and Legacy Chat — no
TextChatService.TextChannelsdependency. - Discord server linked to your game (Discord tab → link your server).
Step 1 — Configure Channels
Open the Chat Bridge tab in the dashboard. You will see two channel ID inputs:
- Roblox → Discord channel (
discordChatChannelId) — the Discord channel where in-game chat messages will appear. Messages from Roblox players will be posted here as embeds. - Discord → Roblox channel (
discordInputChannelId) — the Discord channel where you type messages that get sent into Roblox. Any non-bot message posted here is broadcast to all players in-game via MessagingService.
Both channels can be the same Discord channel if you want a single shared chat. If they are different, the Discord→Roblox channel will not echo Roblox messages back (the bot ignores its own messages).
Step 2 — Install the Roblox Script
In the Chat Bridge tab, expand the Roblox Chat Bridge Script panel, click Copy Script, then paste it as a single Script in ServerScriptService.
The script captures outgoing chat by hooking TextService.OnMessageDoneFiltering— this fires for all chat messages regardless of whether your game uses TextChat (v2) or Legacy Chat, so no TextChatService.TextChannels dependency is required.
- Capture — hooks
TextService.OnMessageDoneFilteringto capture every player chat message, works with both TextChat (v2) and Legacy Chat. - Flush — every 3 seconds, atomically appends buffered messages to the DataStore queue via
UpdateAsync(monotonic sequence + rolling trim to 500 entries). - Deliver — subscribes to MessagingService topic
DiscordChatand sends incoming Discord messages to all players as notifications (broadcast for guild messages, private notification for DMs).
How Messages Are Displayed in Discord
Roblox chat messages appear as Discord embeds with a purple accent. If the sender is linked to a Discord account, their Discord display name and avatar are used in the embed title and thumbnail. The Roblox User ID is shown in the footer. Timestamps use Roblox tick() (seconds since epoch) which are converted to proper Discord timestamps.
In Discord, Roblox chat messages appear as embeds with a purple accent, showing the player's Roblox name and their message. In Roblox, Discord messages appear as player notifications (title “Discord Chat”) with a [Discord] prefix.
- Guild messages → all players see a notification with
[Discord] username: message. - DMs → only the linked player receives the notification.
Disabling the Bridge
Leave one or both channel IDs blank and click Save Chat Bridge. The bot will stop polling for outgoing messages and will not deliver new Discord messages to in-game. Delete the Roblox Script fromServerScriptService to stop it entirely.
Testing in Studio
Studio uses a separate DataStore sandbox — messages you chat in Studio will NOT appear in Discord. MessagingService also does not deliver to Studio clients. To test end-to-end, start a live server (Game → Start Server in Studio, or publish and join the live game).
Troubleshooting
- Chat not appearing in Discord — verify the
discordChatChannelIdis correct, the Roblox script is in ServerScriptService, and the bot at/healthis online. - Discord messages not appearing in Roblox — verify the
discordInputChannelIdis correct, MessagingService is enabled in Experience Settings, and a player is in-game (MessagingService only delivers to live servers). - DataStore errors in Studio — enable "Enable Studio Access to API Services" in Game Settings → Security. DataStore calls do not work in Studio without this.
- 5-15 second delay on Roblox → Discord — this is by design. The bot polls the outbound queue every 5 seconds to batch reads and stay within rate limits.
