Social Chat v2 | Roblox's #1 Open-Sourced chatting resource

💡 Introduction 💡

Install || Github || Discord || Contact

Roblox is a social platform designed to bring users together in experience around around the world. Many developers create unique assets within these experiences to enhance social aspects of their games. However, not everyone knows how to make unique eye-appealing visuals that encompass these aspects.

SocialChat aims to assess these issues by providing developers with complete control over their games regardless of their skill-levels! Below are a few notable features


Support for Custom Emojis :exploding_head:

*Only accessable with the Emojipedia extension

RobloxStudioBeta_7MGoKQadpy

Gradient Effects :rainbow:

RobloxStudioBeta_01JJaelhIs

An expansively configurable Bubble-Chat system :speech_balloon:

RobloxStudioBeta_IRw4rKC4wk

Chat Highlights for readability :sunglasses:

image

A Control Panel for an optimal user-experience

RobloxStudioBeta_4P0hW7x21k

…and much more to come soon! :star2:

You can grab the latest version or check out the system for yourself in game!


📜 Documentation 📜


An official website will be created soon, but for now here’s how you can maximize your usage with SocialChat’s extensive API!

Initially, you must retreive the SocialChat module in your desired script by using the following code:

local SocialChat = require(game.ReplicatedStorage:WaitForChild("SocialChat"));

Additionally, any references to the keyword "this" are strictly refering to Object-Oriented References.

🖥 Server API

Please note that SocialChat API methods come from the components, NOT from the module itself.
If you would like to use any of these api’s, please reference the Src framework as follows:

local API_TO_GET = SocialChat.Src.API_TO_GET

--- Ex:
local Channels = SocialChat.Src.Channels
Channels:ThisMethod() -- runs ":ThisMethod()"
📮 Channels

.new( Name : string ) : Channel < table >

→ Creates a new Channel that can be used to replicate messages to clients.

:Get( ChannelName : string ) : Channel? < table>

→ If the queried channel exists, this method will return it.

:Message( Speaker : Speaker < table >, Message : string, Recipient : Player | Channel )

→ Replicates the provided message IF the speaker and recipient exists. Please note that messages must not be over 200 utf8 characters, otherwise the API method will fail.

:AddValidator( Validator : Function )

→ Adds a “gateway” validator that should return true/false/nil for any passed message values. This is useful for hiding admin command messages. Returning true with your Validator function will prevent the specified message from being sent.

Channel:Subscribe( Player : Player )

→ When creating new channels with the ChannelAPI.new() method, you must subscribe the desired players to the new channel, otherwise messages sent to this channel will not register for players who are not currently subscribed to it.

Channel:Unsubscribe( Player : Player )

→ Unsubscribes the requested player from this channel. This will delete all rendered instances on the player’s end and will prevent the player from receiving new messages from this channel.

Channel:Remove()

→ Destroy’s this channel instance. All players that are subscribed to this channel will be unsubscribed automatically.

.OnMessageSent:Connect(function( Speaker : Speaker, Message : string, Recipient : Player | Channel ))

→ An event that fires whenever a new message is sent to any channel. This universal event will collect all messages, however, please note that messages received from this event are not filtered. This is solely for API usage.

💬 BubbleChat

:Chat( Speaker : Speaker, Message : string )

→ Replicates the provided message using the Speaker provided. This will not create a message in the Channel frame for clients, but it will display a visible chat bubble over the specified speaker’s Author variable.

🎞 DataService

SocialChat’s DataService is fairly gimmiky and I understand it may be confusing to interpret, but the reason for it’s structuring is solely to prevent exploiters from creating infinite data on your DataStores.

To start, each DataStore structure in a player’s data must be structured in the following way for each value.

{
    ["Default"] = any, -- The default value for this entry. Any new values must be the same TYPE as the default value to be set successfully
    ["Value"] = any?, -- This is the user's data value. DataStore's will save this and use this over the "Default" data value (opt. & can be nil initially)
};

To SET new data from the client to the server, you must use the EventDataEntry RemoteEvent and provide a Path and a Value parameter.

Example:

game.ReplicatedStorage.SocialChatEvents.DataService.EventDataEntry:FireServer("Entry-1/Entry-2/Entry-3", true); -- Sets the value of "Entry-3" to "true"

How do paths work?

Similarly to standard file referencing, you must reference the exact location of your data entry to set and change data.

For example, if we were to change a value in a table which can be referenced in a script as PlayerData.Settings.MaxFontSize, we would want to reference that entry by using the path:

local EntryPath = "PlayerData/Settings/MaxFontSize"
📣 Speakers

Speakers allow SocialChat to easily reference Metadata assigned to Agent instances. An Agent is an instance that has been assigned with a certain set of metadata.

.new( Agent : BasePart | Player | string, TagData : table ) : Speaker < table >

→ Creates and returns a new Speaker using the specified speaker values

:Get( Agent : BasePart | Player | string ) : Speaker? < table >

→ Returns the requested speaker IF they exist. Otherwise, returns nil.

.OnSpeakerAdded:Connect(function( SpeakerAdded : Speaker ))

→ An event that fires whenever a new speaker is registered

How does TagData look?

The “TagData” parameter for Speaker.new() is a table of data that can be used to change the appearance of the speaker’s chat instances. This can change the speakers, Bubble Chat apperance, Chat Frame rendering appearance, and more!

For reference, each TagData table must follow the following structure, otherwise an error will be thrown.

Structure Reference:

{
    Color = Color3.fromRGB(...), -- opt.
    Name = "YOUR_NAME_HERE", -- opt.
    Font = Enum.Font
}

General Reference:

{
    ["Classic"] = { -- ChatFrame metadata
        ["Tag"] = {...structure}, -- The user's 'tag' metadata in the ChatFrame
        ["Content"] = {...structure}, -- The user's 'message' metadata in the ChatFrame
        ["Username"] = {...structure} -- The user's 'username' metadata in the ChatFrame
    },

    ["Bubble"] = { -- BubbleChat metadata
        ["BubbleTransparency"] = 0, -- The bubble's background transparency
        ["BubbleColor"] = Color3.fromRGB(...), -- The bubble's background color
        ["TextColor"] = Color3.fromRGB(...), -- The bubble's text color
        ["Font"] = Enum.Font..., -- The bubble's Text-Font
    }
};

💻 Client API

Please note that SocialChat API methods come from the components, NOT from the module itself.
If you would like to use any of these api’s, please reference the Src framework as follows:

local API_TO_GET = SocialChat.Src.API_TO_GET

--- Ex:
local Channels = SocialChat.Src.Channels
Channels:ThisMethod() -- runs ":ThisMethod()"

:warning: All ClientAPI methods are specifically related to the client that uses these methods. For a better understanding, please reference the Server-Client Model.

💬 BubbleChat

:GetControllers() : table

→ Returns a list of all registered BubbleChat controllers on this client.

.new( Agent : BasePart | Player | string, Metadata : table? )

→ Registers a new BubbleChatController using the provided Agent and Metadata parameters.

BubbleController:Chat( Message : string ) : BubbleCollection < table >

→ Renders a new Bubble-Message for this controller using the provided Message string.

BubbleController:Destroy()

→ Destroys this BubbleController

BubbleController.Thinking : boolean

→ A changable variable that strictly accepts boolean values. If true, a thinking bubble will display above the registered Agent’s Instance. (and vise-versa)

BubbleController.Enabled : boolean

→ A changable variable that determines if the BubbleController is currently enabled visibly. This will not prevent the BubbleController from enabling itself again after being used. To do this, you must set the BubbleChatSettings.IsBubbleChatEnabled value to false.

📮 Channels

:Create( Name : string, Members : table?, ChatHistory : table?, IsPrivate : boolean? ) : Channel

→ This method will register a new channel for our client. If more than 1 channel is currently rendered, this will enable the Channel Navigator menu and will automatically create a NavButton for the specified channel.

:Get( Query : string ) : Channel?

→ Returns the specified channel if found. Otherwise returns nil.

:GetFocus() : Channel

→ Returns the client’s currently focused channel

:SendMessage( Text : string, Receiver : ( Player | Channel )? )

→ Sends a message to the server to the client’s currently focused channel OR a specified receiver (if any)

.Registry : table

→ A table that references all currently registered Channels

.OnMessaged:Connect(function( Message : string, Metadata : table, Channel : Channel, IsPrivateMessage : boolean? )

→ An RBXScriptSignal that fires whenever a new chat message is rendered on the client.

:CreateSystemMessage( Message : string, Metadata : table?, Channel : Channel? )

→ Creates a system message without the usage of a Speaker object in the chat frame. This message will send to the client’s currently focused channel unless a Channel parameter is passed. Furthermore, this system message will ONLY render in the client’s chatframe. Other clients will not see this message.

Channel:Focus()

→ Forces the client’s ChatFrame to focus on this channel

Channel:Message( Message : string, Metadata : table?, IsPrivateMessage : boolean? ) : RenderedContent < table >

→ Renders a message to this channel based on the provided parameters. Please note that this API call was designed for servers, but you may also use it over :CreateSystemMessage if preferred.

Channel:Destroy()

→ Destroys this channel and removes all of it’s rendered contents.

🎨 ChatUIManager

:SetEnabled( State : boolean, NoTween : boolean? )

→ Sets the visiblity of the ChatFrame UI. This will not fully-disable the chat

:IsEnabled() : boolean?

→ Returns a boolean that states if the chat is currently enabled

:SetMode(IsFrameHidden : boolean)

→ Similar to having a TextBox only mode, this method will set the chat’s ChatFrame state to the provided IsFrameHidden value.

:Interact()

→ Pings the client with a spoofed interaction call. This prevents the chat frame from fading away.

📥 InputBox

:Set( Content : string, CaptureClientFocus : boolean? )

→ Sets the text within the Chat frame’s InputBox to the specified content string. This should always be used when programmatically changing the InputBox’s text.

:Submit()

→ Submits the current text within the InputBox to the server for replication.


Alternatively, if you’d like to edit the source code itself, you can get it for yourself by running the following command in Roblox Studio’s command bar!

loadstring(game:GetService("HttpService"):GetAsync("https://pastebin.com/raw/ddVNfyrZ"))();

🎆 Developer Notes 🎆


With SocialChat’s new branding, I would like to further state that this resource has taken an infathomable amount of time on my behalf – 6 Months for v2 specifically – because I wanted to polish the system as much as possible. With the bugs and issues that arised from Social Chat v1, I was simply unhappy with how poorly executed my vision was. Hence, why I created v2.

Please consider donating via the Control Panel in game as this resource has costed me tons to publish for free. I do not expect income from this project, but it will be difficult to fund future resources without some help.

If you have questions and/or feature suggestions, feel free to post them here or create a ticket in our community server!

Happy developing! :wink:
- Cosmental


✨ Credits ✨


Make sure to thank these individuals for making SocialChat possible! :tada:



🎫 Poll 🎫

(for research purposes!)
Will you use this chat system?
  • Yes
  • No

0 voters

Would you use this over the default Roblox chat system?
  • Yes
  • No

0 voters

How would you rate the quality of this chat system?
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10

0 voters

107 Likes

Why is the icon content deleted??? Anyways i would rather get it from github so I can use my own plugin Raw Converter to update the scripts

8 Likes

I was wrongfully moderated, however, the issue has been resolved and the icon should display within 3 business days.

I apologize for the inconvenience :sweat_smile:

5 Likes

Get Model appears but it’s giving me an error on picking up the model right now.
image
Social Chat v2 looks really great though, good job!

4 Likes

hmmm, sounds like you got banned for 3 days but you didn’t, also there isn’t the code at the github repo so I don’t think I could use my own plugin for that

Edit: nevermind, this is the real URL


You can go to the Github Repository and get the model :slight_smile:

4 Likes

This is most likely due to the asset’s current state of moderation. Please refer to this instead!

5 Likes

She was banned, but was unbanned earlier today after appealing to Roblox Support, more info is in the SocialChat discord server

3 Likes

Sorry to hear that :sad:

Either way, moderation issues have been dealt with and the team is currently working on it. Meanwhile feel free to use Github as the current source!

2 Likes

I have a question, will the chat support channels? For example, after updating the chat from roblox

2 Likes

Would love to see this available thru Wally as a Package :+1:

2 Likes

Yes! The chat fully supports channels!

You may use this API reference for more info :eyes:

3 Likes

does this support Adonis and rich text?

I’ll definitely use this if thats a yes

2 Likes

You can use Markdown on this, it’s like RichText and The DevForums use Markdown As-Well

**bold text**
_italic text_
~~striked~~

and no it doesn’t you have to modify the code of Adonis to make it work :confused:

5 Likes

An extension will soon be released that will support popular admin panels such as Adonis, HD Admin, and more!

2 Likes

Alright, I’m definitely using this

2 Likes

uh… is this normal after I added this to my game?

Is there way to get it work?

3 Likes

put the ScreenGui called Chat into StarterGui

2 Likes

I did that but… for some reason a default roblox chat doesn’t want to be removed -.-

this is pretty annoying with default chat…

1 Like

add a LocalScript in StarterGui and add this:

local StarterGui = game:GetService("StarterGui")
StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.Chat, false)
2 Likes

I just did that but it not do anything :confused: after I type it in the chat box and it not show up in the chat box.

1 Like