I have a punch script inside my game yet when I type in the roblox chat it plays the animations and punches, how do I stop that?
Here's the keycode script I'm using:
1 | UserInputService.InputBegan:Connect( function (Input) |
2 | if Input.KeyCode = = Enum.KeyCode.R and not Punching then |
3 |
4 | -- Code that would happen when R is pushed AKA animations and damage |
5 |
6 | end |
7 | end ) |
use userinputservice to activate the animation, using that you can see if they are typing something
UserInputService.InputBegan:Connect(function(Input, IsTyping) if IsTyping then return end