I’ve looked at a number of different videos on how to do this now… every one of them is just a bit too outdated and doesn’t work. I’ve managed to find one that really should work, but instead of working it breaks chat entirely. No typing, no messages, no GUI. If anyone knows anything about the basic chat functions and sending messages, can someone please tell me why this is broken?
Module script getting the player tags based on what they own or who they are. In this case, the only thing I have is my user ID-
local ms = game:GetService("MarketplaceService")
local players = {
[72490169] = {title = 'Dev', priority = 5, color = Color3.fromRGB(255, 0, 191)}
}
function sendInfo(player)
local info = nil
local priority = 0
for key, value in pairs(players) do
if player.UserId == key and value.priority > priority then
info = {title = value.title, color = value.color}
priority = value.priority
end
end
return info
end
return sendInfo()
I think this script is fine, but there’s no way to check without having the first script work. If you want to look at it in full it gets created under the service chat and is called “DefaultChatMessage” Here’s a little tidbit of what I edited on to try to get it to work
Original-
local clientChatModules = script.Parent.Parent
local ChatSettings = require(clientChatModules:WaitForChild("ChatSettings"))
local ChatConstants = require(clientChatModules:WaitForChild("ChatConstants"))
local util = require(script.Parent:WaitForChild("Util"))
function CreateMessageLabel(messageData, channelName)
local fromSpeaker = messageData.FromSpeaker
local message = messageData.Message
local extraData = messageData.ExtraData or {}
local useFont = extraData.Font or ChatSettings.DefaultFont
local useTextSize = extraData.TextSize or ChatSettings.ChatWindowTextSize
local useNameColor = extraData.NameColor or ChatSettings.DefaultNameColor
local useChatColor = extraData.ChatColor or ChatSettings.DefaultMessageColor
local useChannelColor = extraData.ChannelColor or useChatColor
local tags = extraData.Tags or {}
local formatUseName = string.format("[%s:]", fromSpeaker)
…and more
Edited-
local clientChatModules = script.Parent.Parent
local ChatSettings = require(clientChatModules:WaitForChild("ChatSettings"))
local ChatConstants = require(clientChatModules:WaitForChild("ChatConstants"))
local util = require(script.Parent:WaitForChild("Util"))
local titleModule = require(game:GetService("Chat").titleModule)
function CreateMessageLabel(messageData, channelName)
local fromSpeaker = messageData.FromSpeaker
local message = messageData.Message
local extraData = messageData.ExtraData or {}
local useFont = extraData.Font or ChatSettings.DefaultFont
local useTextSize = extraData.TextSize or ChatSettings.ChatWindowTextSize
local useNameColor = extraData.NameColor or ChatSettings.DefaultNameColor
local useChatColor = extraData.ChatColor or ChatSettings.DefaultMessageColor
local useChannelColor = extraData.ChannelColor or useChatColor
local tags = extraData.Tags or {}
local info = titleModule(game:GetService("Players"):FindFirstChild(tostring(fromSpeaker)))
local formatUseName
if info then
formatUseName = string.format("[" .. info.title .. "] %s:", fromSpeaker)
useNameColor = info.color
useChatColor = info.color
else
formatUseName = string.format("%s:", fromSpeaker)
end
…and more
There’s more but it’s a long script to put into this. If I comment out ALL of the added parts from the original script, then it works, but otherwise even a single variable left out breaks the whole thing.
If you have a way to fix this, or a different way to do this, I’m desperate… please and thank you :')