Couldn’t you just set the text to an empty string when the forward slash key is pressed? It can’t be that complicated.
Keyboard.KeyDown:Connect(function(code)
if (code == Enum.KeyCode.Slash and not TextField:IsFocused()) then
TextField:CaptureFocus()
TextField.Text = ""
end
end)
Ah, yes. I wish it wasn’t. However, this does not work. It may have to do with TextBoxes getting updated at the end of the frame, after the text gets set to an empty string. I have no idea. I tried to set the text to an empty string in a spawn function since that takes place the next frame, but that did not work either.