So I have a custom message panel that sends a message to the whole server: https://gyazo.com/c3f1b19983c396d141bd4e620edc32a4
As you can see RGB is set to 255,255,255 (white)
but it's black, it does this with everything else too.
Client:
-- Finalize the message by taking all the options and sending it to the server to handle
Send.MouseButton1Click:Connect(function()
if NameFrame.Visible == false then
-- Takes the RGB inputted and puts it together
TextColor = Custom_Message_Panel.R.Text..", " .. Custom_Message_Panel.G.Text..", ".. Custom_Message_Panel.B.Text
local InputName = Custom_Message_Panel.NameBox.Text
local InputText = Custom_Message_Panel.TextBox.Text
SendMessageToServer:FireServer(TextColor, BarkMessage, AnonyMessage, InputName, InputText)
end
end)
Server:
local TextService = game:GetService("TextService")
local SendMessageToServer = game:GetService("ReplicatedStorage").SendMessageToServer
SendMessageToServer.OnServerEvent:Connect(function(plr, TextColor, BarkMessage, AnonyMessage, InputName, InputText)
local InputNameFiltered = TextService:FilterStringAsync(InputName, plr.UserId)
local InputTextFiltered = TextService:FilterStringAsync(InputText, plr.UserId)
local InputNameFiltered = InputNameFiltered:GetNonChatStringForBroadcastAsync()
local InputTextFiltered = InputTextFiltered:GetNonChatStringForBroadcastAsync()
local SentsAvatar = "https://www.roblox.com/Thumbs/Avatar.ashx?x=100&y=100&userId="..plr.UserId
print(InputNameFiltered)
print(InputTextFiltered)
SendMessageToServer:FireAllClients(TextColor, BarkMessage, AnonyMessage, InputNameFiltered, InputTextFiltered, SentsAvatar)
end)
Fires all clients so they can see the message Client:
SendMessageToServer.OnClientEvent:Connect(function(TextColor, BarkMessage, AnonyMessage, InputNameFiltered, InputTextFiltered, SentsAvatar)
local Main = Player.PlayerGui.Popup_Message
print(Main)
print(TextColor)
Main.NameFrame.InputtedName.Text = InputNameFiltered
if AnonyMessage == true then
Main.ChatFrame.Unkown.Visible = true
else
Main.ChatFrame.Unkown.Visible = false
Main.ChatFrame.Avatar.Image = SentsAvatar
Main.ChatFrame.Avatar.Visible = true
end
Main.ChatFrame.Visible = true
Main.NameFrame.Visible = true
for i = 1, #InputTextFiltered do
Main.ChatFrame.Message.Text = string.sub(InputTextFiltered, 1, i)
-- Sets text color
Main.ChatFrame.Message.TextColor3 = Color3.fromRGB(TextColor)
if BarkMessage == true then
game.Workspace.bark:Play()
wait(0.366)
else
wait()
end
end
wait(4)
Main.ChatFrame.Visible = false
Main.NameFrame.Visible = false
end)
I know there's something wrong the script because I have the original text set to white https://gyazo.com/105341afc19192dba09fb2178e141652 this means the script is changing the color but it's always black

2 comments
when you print textcolor in the last script does it already give it something wrong?
No