Bubble chat scripts not working?

I’m Confused.

game.Players.PlayerAdded:Connect(function(plr)
	plr.CharacterAdded:Connect(function()
		game:GetService("TextChatService"):DisplayBubble(plr.Character.Head, "TextChatService works :D")
		game:GetService("Chat"):Chat(plr.Character.Head, "ChatService works")
	end)
end)

Server Script in serverscriptservice

**It does nothing. I’ve tried both chatservice and textchatservice, but neiter of them work. **

I have tried using the legacy chat, but it still doesnt work. any help would be appreciated.

1 Like

Note: The ‘Chat’ class has been deprecated. It is advised to use TextChatService as the replacement.
(TextChatService | Documentation - Roblox Creator Hub)

Hello @SASQUACH_PLAYZ123,

The reason why your source code does not function as expected is due to utilising the TextChatService methods on the server.
The method ‘:DisplayBubble()’ is only available for the client therefore can be only used in LocalScripts or in Scripts with the RunContext set to ‘Client’ as stated in the documentation. (TextChatService | Documentation - Roblox Creator Hub)

Below is an example of LocalScript which utilises the method correctly.

Note: The example used here may be different to what your trying to achieve.

local Players = game:GetService("Players")
local TextChatService = game:GetService("TextChatService")

-- Only the client can see this. Meaning no other player will be able to see this.
Players.LocalPlayer.CharacterAdded:Connect(function(Character: Model) 
	TextChatService:DisplayBubble(Character, "Message 1")
end)


Hope this helps to clear your confusion.

2 Likes

@Bluebookltd Thanks! I was very confused at first but i figured it out by myself a fwe dyas ago.
I’ll still give you the solution tho

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