TextChatService.OnBubbleAdded = function(message: TextChatMessage, adornee: Instance)
if message.TextSource then
print(message.TextSource)
-- Create a new BubbleChatMessageProperties instance to customize the chat bubble
-- Get the user who sent the chat message based on their UserId
local player = Players:GetPlayerByUserId(message.TextSource.UserId)
if player.Character:GetAttribute("OnGrum") == true then
local txt = player.Name..": "..message.Text
lastchatted = player.Name
TextChatService:DisplayBubble(game.Workspace.GrumcastPhones.GrumPhone.CallPartSource,txt)
-- If the player is a VIP, customize the chat bubble properties
end
end
if adornee == game.Workspace:FindFirstChild("GrumcastPhones").GrumPhone.CallPartSource then
print(lastchatted)
local bubbleProperties = Instance.new("BubbleChatMessageProperties")
if lastchatted == "CitizenFoffie" then
bubbleProperties.BackgroundColor3 = Color3.new(0,0,0)
bubbleProperties.TextColor3 = Color3.new(0.117647, 0.27451, 0.568627)
end
return bubbleProperties
end
end
The error doesn’t show up when I test the code on my end so I suspect that it could either be happening within a different part of the script you provided or within a different script altogether. If possible showing the full script would help us debug it much better, and a screenshot of the error in your output would be very helpful as well
Edit for more info: @Naruto_Uzumakui That error shows up when you attempt to resume a coroutine or thread that’s already running and not in a yielding state