I was trying to make specific players have a certain chat bubble colour, the bubble would come over their head when they typed and would be a certain colour for a certain player,
but this has to be server-sided, so everyone can see their bubble colour, using Roblox’s
own chat system and not creating my own, I could make custom tags, but not custom
chat BUBBLE colours for certain players. I have a bit of knowledge on Roblox’s chat system if anyone could help me out that would be greatly appreciated,
thanks.
-- line 220 of the bubblechat script in the chat section in roblox
function createChatBubbleMain(filePrefix, sliceRect)
local chatBubbleMain = Instance.new("ImageLabel")
chatBubbleMain.Name = "ChatBubble"
chatBubbleMain.ScaleType = Enum.ScaleType.Slice
chatBubbleMain.SliceCenter = sliceRect
chatBubbleMain.Image = "rbxasset://textures/" .. tostring(filePrefix) .. ".png"
chatBubbleMain.ImageColor3 = Color3.fromRGB(0, 0, 0) -- [[BUBBLE CHAT COLOUR
FOR EVERYONE, BY ME]]
-- this is what i had in mind, but it only works for the client, other players dont see the
special colour
-- if game.Players.LocalPlayer.Name == "SuperMario1797" then
-- chatBubbleMain.ImageColor3 = Color3.fromRGB(255, 0, 0)
-- end
-- there is the chat trail colours too but i can have those covered, I need to find
-- out how you can make everyone see this colour
chatBubbleMain.BackgroundTransparency = 1
chatBubbleMain.BorderSizePixel = 0
chatBubbleMain.Size = UDim2.new(1.0, 0, 1.0, 0)
chatBubbleMain.Position = UDim2.new(0, 0, 0, 0)
return chatBubbleMain
end]
this is what i had in mind for the custom chat TAG not the BUBBLE COLOUR
i tested this and it works, but only for the chat TAG, not the BUBBLE COLOUR
this is a server script
local plrs = game.Players
local sss = game.ServerScriptService
local groupId = 2929563
local chatService =
require(sss:WaitForChild('ChatServiceRunner'):WaitForChild('ChatService'))
chatService.SpeakerAdded:Connect(function(plr)
local speaker = chatService:GetSpeaker(plr)
if plrs[plr].UserId == 417982580 then
speaker:SetExtraData('NameColor', Color3.fromRGB(255, 0, 0))
speaker:SetExtraData('ChatColor', Color3.fromRGB(124, 238, 255))
speaker:SetExtraData("Chat")
speaker:SetExtraData('Tags', {{TagText = 'Developer', TagColor =
Color3.fromRGB(255, 0, 0)}})
elseif plrs[plr]:IsFriendsWith(417982580) then
speaker:SetExtraData('NameColor', Color3.fromRGB(117,235,168))
speaker:SetExtraData('Tags', {{TagText = 'Dev Friend', TagColor =
Color3.fromRGB(117,235,168)}})
else
speaker:SetExtraData('NameColor', Color3.fromRGB(255,255,255))
speaker:SetExtraData('Tags', {{TagText = 'Player', TagColor =
Color3.fromRGB(255,255,255)}})
end
end)
im not sure if you can achieve this using speaker:SetExtraData , or some other form of script, i just don’t know how to get a custom chat BUBBLE colour that can be seen by
all clients, not just the one client.
any help would be greatly appreciated