So I want to make buttons on surface gui to capture keyboard input so the players don’t have to click but rather press E to interact
The issue is that buttons on surface guis doesn’t capture keyboard input but if the button is parented to a screen gui then the said button captures keyboard inputs
I’ve tried to look around on the forums n stuff but couldn’t really find anything. I did find like 2 posts that were similar to my problem but they were from 2016 - 2018 with no solutions
This is the script I used for getting the input
script.Parent.InputBegan:Connect(function(input)
print("BUTTON",input.KeyCode)
end)
game.UserInputService.InputBegan:Connect(function(input)
print("UIS",input.KeyCode)
end)