I have been making a new chat interface, but for some reason it all falls apart when I test it with more players:
01 | script.Parent.Focused:connect( function () |
02 | if script.Parent.Text = = "Press T, /, or click here to chat" then |
03 | script.Parent.Text = "" |
04 | end |
05 | end ) |
06 | script.Parent.FocusLost:connect( function (EnterPressed) |
07 | if EnterPressed and script.Parent.Text ~ = "" then |
08 | script.Parent.Parent.Value.Value = script.Parent.Text |
09 | script.Parent.Text = "Press T, /, or click here to chat" |
10 | end |
11 | end ) |
12 | function onKeyPress(inputObject, gameProcessedEvent) |
13 | if inputObject.KeyCode = = Enum.KeyCode.Slash or inputObject.KeyCode = = Enum.KeyCode.T then |
14 | script.Parent:CaptureFocus() |
15 | end |
16 | end |
17 | game:GetService( "UserInputService" ).InputBegan:connect(onKeyPress) |
There are NO output errors, so please dont ask
Make sure you check for GameProcessedEvent
, so that you're not stealing input from blocking actions. Also, what is script.Parent.Parent.Value.Value
? It doesn't appear to link out to anything, so chances are each Player is managing to somehow change the same thing all the time, and/or the problem is outside of your given script.