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:
UserInputService.InputBegan:Connect(function(Input) if Input.KeyCode == Enum.KeyCode.R and not Punching then -- Code that would happen when R is pushed AKA animations and damage end 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