So I am trying to make a keybind gui, I already have it all done I just want it where if the player clicks on the textbox than clicks say RightShift than in the Textbox it will change the text to: RightShift Normally if you did that it won't do nothing. I don't know how to do this so a link to a thread or something will be extremely helpful! I was thinking it was input changed but I do not know for sure I tried multiple things. Just don't know which one is the proper way.
You can use InputBegan on the textlabel and make it so that if a key is pressed, it changes the text of the textlabel to the key. (script.Parent is referring to the textlabel)
local userInputService = game:GetService("UserInputService") script.Parent.InputBegan:Connect(function(input)
if input.UserInputType == Enum.UserInputType.Keyboard then
script.Parent.Text = userInputService:GetStringForKeyCode(input.KeyCode)