So I can make it trigger the animation in my gui so that people can press "e" and my gui animation will occur I have no idea how to do this and I need help so please help.
✓ ANSWER ACCEPTED
How can I get the UserInputService to grab the key "e"?
2 answers
✓ Accepted answer
UserInputService is not required to create a KeyDown function.
I suggest reading the Wiki for help on KeyDown and help on Animations.
Click on the "Playing Animations in Player Character", section 2.1, in the table of contents of the Wiki I linked you for the animations.
How to make a function for the key F from a LocalScript:
local player = game.Players.LocalPlayer
local Mouse = player:GetMouse()
Mouse.KeyDown:connect(function(key))
if key == "f" then
--code
end
end)
local plr = game.Players.LocalPlayer local mouse = plr:GetMouse() mouse.KeyDown:connect(function(key) print(key) end)
1 comment
0
but how do I make it a specific key??? Thats what I really want to know.
This discussion is preserved as it was. New answers, comments, and votes are closed.

4 comments
Well I am mostly trying to make the key down function only 1 specific key. And im not trying to do body animations im trying to do it with gui animations.
Edited my answer.
thanks!!!
It worked ty