local screenGui = Instance.new("ScreenGui") screenGui.Parent = script.Parent local textLabel = Instance.new("TextLabel") textLabel.Parent = screenGui textLabel.Position = UDim2.new(0, 0, 0, 0) textLabel.Size = UDim2.new(0, 200, 0, 180) textLabel.BackgroundColor3 = BrickColor.Green().Color textLabel.TextXAlignment = 0 textLabel.TextYAlignment = 0 textLabel.Font = 10 textLabel.FontSize = 5 textLabel.Text = "" textLabel.Visible = false local textBox = Instance.new("TextBox") textBox.Parent = screenGui textBox.Position = UDim2.new(0, 0, 0, 180) textBox.Size = UDim2.new(0, 200, 0, 20) textBox.BackgroundColor3 = BrickColor.Green().Color textBox.TextXAlignment = 0 textBox.TextYAlignment = 1 textBox.Font = 10 textBox.FontSize = 5 textBox.Text = "" textBox.Visible = false function onKeyPress(inputObject, gameProcessedEvent) if inputObject.KeyCode == Enum.KeyCode.Tilde then textLabel.Visible = true textBox.Visible = true end end game:GetService("UserInputService").InputBegan:connect(onKeyPress)
Everything except for the final paragraph of code is working. Does anyone know what the problem is? Thank you!
EDIT: I've figured out that the tilde is actually the thing causing the problem, not the other commands.