Making bubble chat messages offset similar to BillboardGui

You can write your topic however you want, but you need to answer these questions:

  1. What do you want to achieve?
    I want chat bubble to be always on top of the player, no matter what rotation he has. You can do it with BillboardGui but I haven’t seen any setting that would do it in TextChatService

  2. What is the issue?
    I made players inside a ball, problem is when they rotate, that text rotates around too, which is not good. I also tried setting Adornee to that ball, but that did not help

It is set to marble in the game right now, but setting it to player had similar effect
image

I am just wondering if there is any simple solution other than creating part that always stays on top of the player by setting the CFrame each frame.

1 Like

Shouldn’t you already know how to do this :nerd_face:

1 Like

I wish someone would have answer to my problem.

Simply all you have to do I type this out on a local script and change 3 to the desired value you want:

game:GetService("TextChatService").BubbleChatConfiguration.VerticalStudsOffset = 3

I did see a post of someone talking of an alternative, better looking way of doing it but it seems to not work anymore:

local ChatService = game:GetService("Chat")
ChatService:SetBubbleChatSettings({
    VerticalStudsOffset = 3
})

And to fix the rotation issue you can make a separate part and use AlignPosition and AlignOrientation to lock the part in and then adornee the bubble chat to that.

I tried this one, but could not get it working

Alright I have seemed to find one that will work pretty well, basically:

local bubblePivotPart = Instance.new("Part")
local att0 = Instance.new("Attachment",bubblePivotPart)
local att1 = Instance.new("Attachment",ball)
local alignPos = Instance.new("AlignPosition",bubblePivotPart)
local alignOri = Instance.new("BodyGyro",bubblePivotPart)

alignPos.Attachment0 = att0
alignPos.Attachment1 = att1
alignPos.MaxForce = math.huge
alignPos.Responsiveness = 200

alignOri.P = 400000

tell me how this works, and make sure to replace local att1 = Instance.new("Attachment",ball) with the ball for parenting

this would be locally, btw.
and adornee the chat bubble to the part and offset it

Okay so, after a bit of playing, I found out that using align position is slow, and other methods like rigit or align orientation would just stop whole rotation of the ball. But I found out that using align orientation and ballsocket creates connection thats perfect.
image
and I can roll around while part keeping its place and orientation.

Problem is, that the text bubble is still doing it’s thing of moving around, even though I made it adornee to that part:
image

image
So maybe if anyone knew a way to make own chat bubble with BillboardGui and then replace every chat bubble with my own one ? I think that would help a lot, since I could set it up easier.

1 Like

You could use this structure I’ve just cooked up in 5 minutes and stylize it to your liking:

local plr = game.Players.LocalPlayer
local char = plr.Character or plr.CharacterAdded:Wait()

local chatWaitTime = 30 --default
plr.Chatted:Connect(function(msg)
	local newBillboard = game.ReplicatedStorage.BillboardGUI:Clone() --path for billboard cloning

	newBillboard.Parent = chatBubblePivotPoint --part above player always
	newBillboard.TextLabel.Text = msg
	game.Debris:AddItem(chatWaitTime,newBillboard)
end)

tell me if this is what your looking for!

just wanted to jump in and add: remember to filter the message before displaying it if you do this, because plr.Chatted is unfiltered

1 Like

Good Catch! Thanksm I totally forgot about that.

1 Like

I tried looking into it, and I mean, it would be possible, but I would have to code whole new chat system, which I think is really unnecessary. Maybe if anyone knew how to show hidden scripts from roblox, like the one which handles chat bubbles, or where chat bubbles are located, once created, that would help too.

Okay, so, after a bit of testing, I found really weird behavior, and I think I should create new ticket and mark it as bug report. It has to do something with how the player is rotated, but I dont know why. I just took some part from workspace, made it as adornee for the chat bubble, and this is what’s happening:
image

image

If the player rotates, that bubble chat message is offsetting, and I have no idea how to disable it. I believe it might just be bug.

Yeah probably should makes a new ticket this is very strange behavior.

I found workaround, I will post soon

If anyone is wondering about the solution, its posted here:

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.