How do i check if a bubble chat is above a players head

i think the title is pretty self explanatory
i have a little custom nametag system and i want it to disappear if the player is chatting. for this to happen, i need to detect if a chat bubble is above their head
image
image
^ fades out and doesn’t layer on top when far away

2 Likes

I’m curious about this one as well. Anyone know the answer as it relates to the new in-experience text chat?

I encountered a simular issue. Only thing was I wanted to play a sound effect each time something entered the chat box.

game:GetService("Players").LocalPlayer:WaitForChild("PlayerGui"):WaitForChild("Chat"):WaitForChild("Frame"):WaitForChild("ChatChannelParentFrame"):WaitForChild("Frame_MessageLogDisplay"):WaitForChild("Scroller").ChildAdded:Connect(function(part)
		local NameOfSomeoneWhoSpokeInTheChat = part:WaitForChild("TextLabel"):WaitForChild("TextButton").Text
		local WhatThatSomeoneSaidInTheChat = part:WaitForChild("TextLabel").Text
		
		print(NameOfSomeoneWhoSpokeInTheChat, WhatThatSomeoneSaidInTheChat)
	end)

Just put this anywhere in the local script and type something in the chat.

Assuming you’re using the default chat system, you have access to the displayname of someone who just typed in chat.

Lmk if it doesn’t work :slight_smile:

Though I do not need your answer anymore, I will mark this as a solution for those who come by!

1 Like

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