Hey, I have a UI where you can turn on/off chat tags and pick which chat tag you want. It works yet when you test with multiple devices and speak it only shows up for yourself and not others.
Help would be appreciated.
local chatTag = settingFrame.ScrollingFrame.ChatTag
local tag_remote = rs.Game.Events.RemoteEvents.tag_remote
local chatTagOn = false
local TagClicked = false
chatTag.ImageButton.Activated:Connect(function()
chatTagOn = not chatTagOn
if chatTagOn then
chatTag.ImageButton.Image = "rbxassetid://113287267199779"
settingFrame.ChatTagFrame.Visible = true
else
chatTag.ImageButton.Image = "rbxassetid://86158734518876"
settingFrame.ChatTagFrame.Visible = false
TagClicked = false
tcs.OnIncomingMessage = function(message : TextChatMessage)
if not message.TextSource then
return
end
end
end
end)
for _, tag in settingFrame.ChatTagFrame:GetChildren() do
if tag:IsA("ImageButton") or tag:IsA("TextButton") then
tag.Activated:Connect(function()
if TagClicked == false then
TagClicked = not TagClicked
print("player Clicked")
tcs.OnIncomingMessage = function(message : TextChatMessage)
if not message.TextSource then
return
end
local properties = Instance.new("TextChatMessageProperties")
local playerByID = Players:GetPlayerByUserId(message.TextSource.UserId)
properties.PrefixText = "<font color='"..tags_module.UVCTags[tag.Name].Color.."'>"..tags_module.UVCTags[tag.Name].Tag.."</font> "..message.PrefixText
return properties
end
elseif TagClicked == true then
TagClicked = not TagClicked
tcs.OnIncomingMessage = function(message : TextChatMessage)
if not message.TextSource then
return
end
end
end
end)
end
end```