Pressing E Doesn't Trigger Animation?
Asked by
7 years ago Edited 7 years ago
So, I have a script requiring UserInputService to trigger an animation when the key E is pressed. Although UserInputService is working fine, I checked, it works just fine, the trigger for E is not working correctly. The Output gives me 0 errors which confuses me even more-
Here's my code.
01 | local input = game:GetService( "UserInputService" ) |
02 | function onInput(process,plrinput) |
04 | if plrinput.KeyCode = = Enum.KeyCode.E then |
06 | local animation = Instance.new( "Animation" ) |
13 | input.InputBegan:Connect(onInput) |
I might be a fool for not knowing how to do this, but uh...
Hey, at least I asked.