Message = script.Parent["Message"] Chatbar = script.Parent function Chat() local mouse = game.Players.LocalPlayer:GetMouse() mouse.KeyDown:connect(function (key) if key == 'enter' then game.Players.PlayerAdded:connect(function(pl) pl.Chatted:connect(function(msg) msg = Message.Text end) end) end end) end
You'd have to change if key == 'enter' then
to if key == string.char(13) then
. I believe that's the correct number. If it isn't, go here: Taking Keyboard Input. I hope this helped!