You can write your topic however you want, but you need to answer these questions:
What do you want to achieve? Keep it simple and clear!
I would like to be able to change the tag infront of the name and the color too.
What is the issue? Include screenshots / videos if possible!
The upper function doesn’t start at all. Idk how to fuse them to make them both work.
local TextChatService = game:GetService("TextChatService")
local Players = game:GetService("Players")
local player = script.Parent.Parent
player.CharacterAdded:Wait()
local Tag = game.Workspace.Date.Giocatori:FindFirstChild("="..player.Name)
local Color
TextChatService.OnIncomingMessage = function(message: TextChatMessage)
local properties = Instance.new("TextChatMessageProperties")
if message.TextSource then
local player = Players:GetPlayerByUserId(message.TextSource.UserId)
if Tag:GetAttribute("Intro") == false then
properties.PrefixText = "<font color='#FFFFFF'>[Noob]</font> " .. message.PrefixText
end
end
return properties
end
TextChatService.OnIncomingMessage = function(textChatMessage: TextChatMessage)
local properties = Instance.new("TextChatMessageProperties")
Color = Tag:GetAttribute("Colore")
local textSource = textChatMessage.TextSource
if textSource then
properties.PrefixText = string.format("<font color='#%s'>%s</font>", Color:ToHex(), textChatMessage.PrefixText)
end
return properties
end
What solutions have you tried so far? Did you look for solutions on the Developer Hub?
tried searching around, found nothing
Now the tag and the right color is visible. But the player name not anymore.
If I add the check to the useriD it gives me error.
local TextChatService = game:GetService("TextChatService")
local Players = game:GetService("Players")
local player = script.Parent.Parent
player.CharacterAdded:Wait()
local Tag = game.Workspace.Date.Giocatori:FindFirstChild("="..player.Name)
local Color
TextChatService.OnIncomingMessage = function(textChatMessage: TextChatMessage, message: TextChatMessage)
local properties = Instance.new("TextChatMessageProperties")
Color = Tag:GetAttribute("Colore")
local textSource = textChatMessage.TextSource
if textSource then
if Tag:GetAttribute("Intro") == false then
properties.PrefixText = string.format("<font color='#%s'>[Noob]</font>", Color:ToHex(), textChatMessage.PrefixText)
else
properties.PrefixText = string.format("<font color='#%s'>%s</font>", Color:ToHex(), textChatMessage.PrefixText)
end
end
return properties
end