How do I make a gui button for a key on a keyboard? Ex: A gui that is also a shift key
✓ ANSWER ACCEPTED
How do I make a gui correspond with a keyboard key?
1 answer
✓ Accepted answer
If you are using a local script, you can use GetMouse on the LocalPlayer, and have a Key event. I prefer the KeyUp event, which triggers after a key is released:
--IN A LOCAL SCRIPT
game.Players.LocalPlayer:GetMouse().KeyUp:connect(function(key)
if key == "q" then --or whichever key
--your code
end
end)
Hope this helped you!
This discussion is preserved as it was. New answers, comments, and votes are closed.

2 comments
Thanks, this helped alot.
No Problem!