Since roblox is removing LegacyChatSerivice, I have to migrate to the new TextChatService, some issues with this is that my game is built around a custom chat system that used the old service. Im completely unfamiliar with this new service because I never would’ve thought that roblox would remove the old one. Enough rambling tho!
My issue is that I need to move the ChatInputBar from the bottom of the chat to the top. And if possible, I’d still like to use my custom chat system
Yeah, it would be nice if Roblox wouldn’t change things all the time. Though this is a fixable solution. You could make a script like this to maintain a custom chat system, but move the chatbar to the top.
local TextChatService = game:GetService("TextChatService")
local player = game.Players.LocalPlayer
local playerGui = player:WaitForChild("PlayerGui")
-- Create or get custom chat system UI
local customChatFrame = playerGui:WaitForChild("CustomChatFrame")
-- Get the default ChatInputBar
local chatInputBar = playerGui:WaitForChild("Chat").ChatInputBar
-- Move the ChatInputBar to the top
chatInputBar.Position = UDim2.new(0, 0, 0, 0) -- Top-left corner, adjust as needed
-- Optional: Customize the appearance of the ChatInputBar
chatInputBar.BackgroundColor3 = Color3.fromRGB(0, 0, 0)
chatInputBar.TextColor3 = Color3.fromRGB(255, 255, 255)
-- Connect to the event when a message is sent
TextChatService.OnIncomingMessage = function(message)
-- Handle the message in your custom system
customChatFrame:DisplayMessage(message) -- Assuming you have a method to display messages
end
-- Send a message using the custom chat system
function sendMessage(messageText)
-- Customize how the message is sent
local message = Instance.new("TextChatMessage")
message.Text = messageText
TextChatService:SendMessage(message)
end
That outta work! Let me know if you need anything else!