Hey, I am trying out the new chat system which we are having to migrate to and I can’t seem to figure out how to fix the chat bubble system I have that displays a chat bubble over a players head when they are typing. I have spent 2 hours trying to figure it out and I still am unable to. If anyone could help that would be much appreciated!
Code in ServerScriptService
local Player = game.Players.LocalPlayer
local UserInputService = game:GetService(“UserInputService”)
UserInputService.TextBoxFocused:Connect(function(TextBox)
if TextBox.Name == “ChatBar” then
game.ReplicatedStorage.ToggleTypingBubble:FireServer(true)
end
end)
UserInputService.TextBoxFocusReleased:Connect(function(TextBox)
if TextBox.Name == “ChatBar” then
game.ReplicatedStorage.ToggleTypingBubble:FireServer(false)
end
end)
Code in StarterGui
game.Players.PlayerAdded:Connect(function(Player)
Player.CharacterAdded:Connect(function(Character)
local TypingBubble = script.TypingBubble:Clone()
TypingBubble.Parent = Character.Head
end)
end)
game.ReplicatedStorage.ToggleTypingBubble.OnServerEvent:Connect(function(Player, Toggle)
Player.Character.Head.TypingBubble.Enabled = Toggle
end)
Thanks,
Leo