I have been making a new chat interface, but for some reason it all falls apart when I test it with more players:
script.Parent.Focused:connect(function()
if script.Parent.Text == "Press T, /, or click here to chat" then
script.Parent.Text = ""
end
end)
script.Parent.FocusLost:connect(function(EnterPressed)
if EnterPressed and script.Parent.Text ~= "" then
script.Parent.Parent.Value.Value = script.Parent.Text
script.Parent.Text = "Press T, /, or click here to chat"
end
end)
function onKeyPress(inputObject, gameProcessedEvent)
if inputObject.KeyCode == Enum.KeyCode.Slash or inputObject.KeyCode == Enum.KeyCode.T then
script.Parent:CaptureFocus()
end
end
game:GetService("UserInputService").InputBegan:connect(onKeyPress)
There are NO output errors, so please dont ask

1 comment
I haven't tried anything yet as I have no idea what is causing the error