The richtext won’t stop after the </b>
. I have tried for countless hours for this to work but it just won’t. Please help.
Server script:
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local logMessageEvent = ReplicatedStorage:WaitForChild("Events"):WaitForChild("Other"):WaitForChild("SendLog")
return function(context, text, color)
local player = context.Executor
local playerrank = player:GetRankInGroup(8423759)
local currentTime = os.date("*t")
local time = os.date("%d/%m/%Y, %X", os.time())
local rankTitles = {
[6] = "Moderator",
[7] = "Administrator",
[8] = "Developer",
[9] = "Manager",
[255] = "Owner",
}
local rankTitle = rankTitles[playerrank] or "Unknown"
local colorCode
if color == "Orange" then
colorCode = "#FFA500"
elseif color == "Red" then
colorCode = "#ff4346"
elseif color == "Green" then
colorCode = "#00FF7F"
elseif color == "Blue" then
colorCode = "#87CEEB"
else
colorCode = "#FFFFFF"
end
local message = string.format("[%s] | %s", time, text)
logMessageEvent:FireAllClients(string.format("<font color='%s'><b>%s</b></font>", colorCode, message), color)
return "Fired, check logs channel."
end
Client script:
local Players = game:GetService("Players")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local logWelcomeEvent = ReplicatedStorage:WaitForChild("Events"):WaitForChild("Other"):WaitForChild("LogEvent")
local staffWelcomeEvent = ReplicatedStorage:WaitForChild("Events"):WaitForChild("Other"):WaitForChild("StaffEvent")
local logMessageEvent = ReplicatedStorage:WaitForChild("Events"):WaitForChild("Other"):WaitForChild("SendLog")
local function sendWelcomeMessage(channelName, message)
local channel = game:GetService("TextChatService"):WaitForChild("TextChannels"):WaitForChild(channelName)
if channel then
channel:DisplaySystemMessage(string.format("<font color='#D3D3D3'>%s</font>", message:format(Players.LocalPlayer.Name)))
end
end
staffWelcomeEvent.OnClientEvent:Connect(function(message)
sendWelcomeMessage("Staff", message)
end)
logWelcomeEvent.OnClientEvent:Connect(function(message)
sendWelcomeMessage("Logs", message)
end)
logMessageEvent.OnClientEvent:Connect(function(text)
local channel = game:GetService("TextChatService"):WaitForChild("TextChannels"):WaitForChild("Logs")
if channel then
channel:DisplaySystemMessage(string.format("<font color='#FFFFFF'><b>%s</b></font>", text))
end
end)
Thanks
EDIT: No errors, literally just the whole string becomes bold no matter what.