Well. Im trying to make a button trigger a gui animation. So I need to know this.
COMMUNITY QUESTION
How can I make the User UserInputService grab the "e" button? Any tutorials?
1 answer
This would actually fall into using the Mouse and PlayerMouse properties instead of UserInputService.
Here is some sample code that prints the key pressed to the output: (note: it must be placed inside a LocalScript, which in turn is placed inside of the StarterGui)
local plr = game.Players.LocalPlayer
local mouse = plr:GetMouse()
mouse.KeyDown:connect(function(key)
print(key)
end)
--Written off the top of my head, may or may not work.
1 comment
1
thanks ill try this but wait where do I put the key I want people to have to press?
This discussion is preserved as it was. New answers, comments, and votes are closed.

1 comment
http://wiki.roblox.com/index.php?title=KeyPressed_(Event)